public class Transport extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MESSAGE_WAIT_TIMEOUT |
static byte[] |
EMPTY_BYTE_ARRAY |
static int |
TSDB_CODE_RPC_NETWORK_UNAVAIL |
static int |
TSDB_CODE_RPC_SOMENODE_NOT_CONNECTED |
| 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() |
ConnectionParam |
getConnectionParam() |
int |
getReconnectCount() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
isConnectionLost() |
boolean |
reconnectCurNode() |
Response |
send(Request request) |
Response |
send(String action,
long reqId,
io.netty.buffer.ByteBuf buffer) |
Response |
send(String action,
long reqId,
long resultId,
long type,
byte[] rawData) |
Response |
send(String action,
long reqId,
long resultId,
long type,
byte[] rawData,
byte[] rawData2) |
void |
sendWithoutResponse(Request request) |
Response |
sendWithoutRetry(Request request) |
void |
setTimeout(long timeout) |
void |
shutdown() |
public static final int DEFAULT_MESSAGE_WAIT_TIMEOUT
public static final int TSDB_CODE_RPC_NETWORK_UNAVAIL
public static final int TSDB_CODE_RPC_SOMENODE_NOT_CONNECTED
public static final byte[] EMPTY_BYTE_ARRAY
public Transport(WSFunction function, ConnectionParam param, InFlightRequest inFlightRequest) throws SQLException
SQLExceptionpublic void setTimeout(long timeout)
public Response send(Request request) throws SQLException
SQLExceptionpublic Response send(String action, long reqId, long resultId, long type, byte[] rawData) throws SQLException
SQLExceptionpublic Response send(String action, long reqId, long resultId, long type, byte[] rawData, byte[] rawData2) throws SQLException
SQLExceptionpublic Response send(String action, long reqId, io.netty.buffer.ByteBuf buffer) throws SQLException
SQLExceptionpublic Response sendWithoutRetry(Request request) throws SQLException
SQLExceptionpublic void sendWithoutResponse(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
SQLExceptionpublic int getReconnectCount()
public boolean isConnected()
public final ConnectionParam getConnectionParam()
Copyright © 2025. All rights reserved.