Class OChannelBinaryAsynchClient
java.lang.Object
com.orientechnologies.orient.enterprise.channel.OChannel
com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient
- All Implemented Interfaces:
OChannelDataInput,OChannelDataOutput
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
debug, in, out -
Constructor Summary
ConstructorsConstructorDescriptionOChannelBinaryAsynchClient(String remoteHost, int remotePort, OContextConfiguration config, OSocketFactory factory, int iProtocolVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeginRequest(byte iCommand, ORemoteClientNodeSession nodeSession) voidbeginRequest(byte iCommand, ORemoteClientSession session) byte[]beginResponse(int iRequesterId, boolean token) byte[]beginResponse(int iRequesterId, long iTimeout, boolean token) voidvoidclose()voidvoidlongintshortGets the major supported protocol versionvoidhandleException(Throwable throwable) inthandleStatus(byte iResult, int iClientTxId) inthandleStatus(byte iResult, int iClientTxId, OChannelBinaryAsynchClient.ExceptionHandler exceptionHandler) booleanTells if the channel is connected.booleanisInUse()voidvoidvoidsetSocketTimeout(int socketTimeout) booleantryLock()voidunlock()Methods inherited from class com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
flush, getDataInput, getDataOutput, readBoolean, readByte, readBytes, readInt, readLong, readRID, readShort, readString, readVersion, setReadRequestTimeout, setWaitRequestTimeout, setWaitResponseTimeout, writeBoolean, writeByte, writeBytes, writeBytes, writeInt, writeLong, writeRID, writeShort, writeString, writeVersionMethods inherited from class com.orientechnologies.orient.enterprise.channel.OChannel
acquireReadLock, acquireWriteLock, connected, getLocalIpAddress, getLockWrite, releaseReadLock, releaseWriteLock, toString, tryAcquireWriteLock, updateMetricFlushes, updateMetricReceivedBytes, updateMetricTransmittedBytes
-
Field Details
-
srvProtocolVersion
protected final short srvProtocolVersion
-
-
Constructor Details
-
OChannelBinaryAsynchClient
public OChannelBinaryAsynchClient(String remoteHost, int remotePort, OContextConfiguration config, OSocketFactory factory, int iProtocolVersion) throws IOException - Throws:
IOException
-
-
Method Details
-
beginResponse
- Throws:
IOException
-
beginResponse
- Throws:
IOException
-
endResponse
- Throws:
IOException
-
endRequest
- Throws:
IOException
-
close
public void close()- Overrides:
closein classOChannelBinary
-
clearInput
- Overrides:
clearInputin classOChannelBinary- Throws:
IOException
-
isConnected
public boolean isConnected()Tells if the channel is connected.- Returns:
- true if it's connected, otherwise false.
-
getSrvProtocolVersion
public short getSrvProtocolVersion()Gets the major supported protocol version -
getServerURL
-
tryLock
public boolean tryLock() -
unlock
public void unlock() -
handleStatus
public int handleStatus(byte iResult, int iClientTxId, OChannelBinaryAsynchClient.ExceptionHandler exceptionHandler) throws IOException - Throws:
IOException
-
handleStatus
- Throws:
IOException
-
handleException
-
beginRequest
- Throws:
IOException
-
beginRequest
- Throws:
IOException
-
getSocketTimeout
public int getSocketTimeout() -
setSocketTimeout
public void setSocketTimeout(int socketTimeout) -
getLastUse
public long getLastUse() -
markReturned
public void markReturned() -
markInUse
public void markInUse() -
isInUse
public boolean isInUse()
-