Package org.apache.iotdb.rpc
Class AutoScalingBufferWriteTransport
- java.lang.Object
-
- org.apache.thrift.transport.TTransport
-
- org.apache.iotdb.rpc.NonOpenTransport
-
- org.apache.iotdb.rpc.AutoScalingBufferWriteTransport
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class AutoScalingBufferWriteTransport extends NonOpenTransport
Note that this class is mainly copied from classAutoExpandingBufferWriteTransport. since that class does not support inheritance, so rewrite this class.
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.rpc.NonOpenTransport
isOpen
-
-
Constructor Summary
Constructors Constructor Description AutoScalingBufferWriteTransport(int initialCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckReadBytesAvailable(long numBytes)byte[]getBuffer()org.apache.thrift.TConfigurationgetConfiguration()intgetPos()intread(byte[] buf, int off, int len)voidreset()voidresizeIfNecessary(int size)voidupdateKnownMessageSize(long size)voidwrite(byte[] toWrite, int off, int len)-
Methods inherited from class org.apache.iotdb.rpc.NonOpenTransport
close, isOpen, open
-
-
-
-
Method Detail
-
read
public int read(byte[] buf, int off, int len)- Specified by:
readin classorg.apache.thrift.transport.TTransport
-
write
public void write(byte[] toWrite, int off, int len)- Specified by:
writein classorg.apache.thrift.transport.TTransport
-
getPos
public int getPos()
-
reset
public void reset()
-
resizeIfNecessary
public void resizeIfNecessary(int size)
-
getBuffer
public byte[] getBuffer()
- Overrides:
getBufferin classorg.apache.thrift.transport.TTransport
-
getConfiguration
public org.apache.thrift.TConfiguration getConfiguration()
- Specified by:
getConfigurationin classorg.apache.thrift.transport.TTransport
-
updateKnownMessageSize
public void updateKnownMessageSize(long size) throws org.apache.thrift.transport.TTransportException- Specified by:
updateKnownMessageSizein classorg.apache.thrift.transport.TTransport- Throws:
org.apache.thrift.transport.TTransportException
-
checkReadBytesAvailable
public void checkReadBytesAvailable(long numBytes) throws org.apache.thrift.transport.TTransportException- Specified by:
checkReadBytesAvailablein classorg.apache.thrift.transport.TTransport- Throws:
org.apache.thrift.transport.TTransportException
-
-