Class OChannelBinaryClientAbstract
java.lang.Object
com.orientechnologies.orient.enterprise.channel.OChannel
com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
com.orientechnologies.orient.client.binary.OChannelBinaryClientAbstract
- All Implemented Interfaces:
OChannelDataInput,OChannelDataOutput
- Direct Known Subclasses:
OChannelBinarySynchClient
Abstract implementation of binary channel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected byteprotected Stringprotected final intprotected final shortFields inherited from class com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
debug, in, out -
Constructor Summary
ConstructorsConstructorDescriptionOChannelBinaryClientAbstract(OSocketFactory factory, String remoteHost, int remotePort, String iDatabaseName, OContextConfiguration iConfig, int protocolVersion) -
Method Summary
Modifier and TypeMethodDescriptionvoidshortGets the major supported protocol versionprotected inthandleStatus(byte iResult, int iClientTxId) booleanTells if the channel is connected.protected voidprotected voidthrowSerializedException(byte[] serializedException) booleantryLock()voidunlock()Methods inherited from class com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary
close, 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
-
socketTimeout
protected final int socketTimeout -
srvProtocolVersion
protected final short srvProtocolVersion -
serverURL
-
currentStatus
protected byte currentStatus -
currentSessionId
protected int currentSessionId
-
-
Constructor Details
-
OChannelBinaryClientAbstract
public OChannelBinaryClientAbstract(OSocketFactory factory, String remoteHost, int remotePort, String iDatabaseName, OContextConfiguration iConfig, int protocolVersion) throws IOException - Throws:
IOException
-
-
Method Details
-
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
- Throws:
IOException
-
setReadResponseTimeout
- Throws:
SocketException
-
throwSerializedException
- Throws:
IOException
-