Class ORemoteServerChannel
java.lang.Object
com.orientechnologies.orient.server.distributed.ORemoteServerChannel
Remote server channel.
- Author:
- Luca Garulli
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionORemoteServerChannel(ORemoteServerAvailabilityCheck check, ONodeId localNode, ONodeId iServer, String iURL, String user, String passwd, int currentProtocolVersion, ExecutorService exec) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginRequest(OChannelDataOutput output, byte iCommand, int sessionId, byte[] token) voidvoidclose()voidconnect()intprotected static inthandleStatus(byte iResult, int iClientTxId, OChannelDataInput input, int srvProtocolVersion) protected <T> TnetworkOperation(byte operationId, ORemoteServerChannel.ORemoteClientOperation<T> operation, String errorMessage, int maxRetry, boolean autoReconnect) protected byte[]readResponse(OChannelDataInput input, int srvProtocolVersion) voidsendBinaryRequest(OBinaryRequest request) voidvoidsendMessage(ONetworkMessage message) voidsendRequest(ODistributedRequest request) voidsendResponse(ODistributedResponse response) protected static voidthrowSerializedException(byte[] serializedException)
-
Constructor Details
-
ORemoteServerChannel
public ORemoteServerChannel(ORemoteServerAvailabilityCheck check, ONodeId localNode, ONodeId iServer, String iURL, String user, String passwd, int currentProtocolVersion, ExecutorService exec)
-
-
Method Details
-
connect
public void connect() -
getDistributedProtocolVersion
public int getDistributedProtocolVersion() -
sendBinaryRequest
-
checkReconnect
public void checkReconnect() -
sendMessage
-
sendRequest
-
sendResponse
-
sendConnect
- Throws:
IOException
-
readResponse
- Throws:
IOException
-
close
public void close() -
beginRequest
public void beginRequest(OChannelDataOutput output, byte iCommand, int sessionId, byte[] token) throws IOException - Throws:
IOException
-
networkOperation
protected <T> T networkOperation(byte operationId, ORemoteServerChannel.ORemoteClientOperation<T> operation, String errorMessage, int maxRetry, boolean autoReconnect) -
getServer
-
getCreatedOn
-
handleStatus
protected static int handleStatus(byte iResult, int iClientTxId, OChannelDataInput input, int srvProtocolVersion) throws IOException - Throws:
IOException
-
throwSerializedException
- Throws:
IOException
-