public class Transport extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MESSAGE_WAIT_TIMEOUT |
| Constructor and Description |
|---|
Transport(WSFunction function,
ConnectionParam param,
InFlightRequest inFlightRequest) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConnection(int connectTimeout) |
void |
close() |
void |
disconnectAndReconnect() |
boolean |
doReconnectCurNode() |
boolean |
isClosed() |
boolean |
isConnectionLost() |
boolean |
reconnectCurNode() |
Response |
send(Request request) |
Response |
send(String action,
long reqId,
long stmtId,
long type,
byte[] rawData) |
void |
sendWithoutRep(Request request) |
Response |
sendWithoutRetry(Request request) |
void |
setBinaryMessageHandler(Consumer<ByteBuffer> binaryMessageHandler) |
void |
setTextMessageHandler(Consumer<String> textMessageHandler) |
void |
setTimeout(long timeout) |
void |
shutdown() |
public static final int DEFAULT_MESSAGE_WAIT_TIMEOUT
public Transport(WSFunction function, ConnectionParam param, InFlightRequest inFlightRequest) throws SQLException
SQLExceptionpublic void setBinaryMessageHandler(Consumer<ByteBuffer> binaryMessageHandler)
public void setTimeout(long timeout)
public Response send(Request request) throws SQLException
SQLExceptionpublic Response send(String action, long reqId, long stmtId, long type, byte[] rawData) throws SQLException
SQLExceptionpublic Response sendWithoutRetry(Request request) throws SQLException
SQLExceptionpublic void sendWithoutRep(Request request) throws SQLException
SQLExceptionpublic boolean isClosed()
public boolean isConnectionLost()
public void disconnectAndReconnect()
throws SQLException
SQLExceptionpublic void close()
close in interface AutoCloseablepublic void checkConnection(int connectTimeout)
throws SQLException
SQLExceptionpublic void shutdown()
public boolean doReconnectCurNode()
throws SQLException
SQLExceptionpublic boolean reconnectCurNode()
throws SQLException
SQLExceptionCopyright © 2024. All rights reserved.