Package com.illumon.iris.binarystore
Class BinaryStoreBufferProcessorV1
java.lang.Object
com.illumon.iris.binarystore.AbstractBinaryStoreReader
com.illumon.iris.binarystore.AbstractBinaryStoreReaderV1
com.illumon.iris.binarystore.BinaryStoreBufferProcessorV1
- All Implemented Interfaces:
BinaryStoreBufferProcessor,BinaryStoreReader,TableReader
public class BinaryStoreBufferProcessorV1
extends AbstractBinaryStoreReaderV1
implements BinaryStoreBufferProcessor
V1 Binary Store.
Enables processing buffers of binary data, without providing a source (other than the buffer).
All methods for reading more data from a source are disabled.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.binarystore.AbstractBinaryStoreReader
AbstractBinaryStoreReader.MissingGetterExceptionNested classes/interfaces inherited from interface com.illumon.iris.binarystore.BinaryStoreBufferProcessor
BinaryStoreBufferProcessor.ReadDataExceptionNested classes/interfaces inherited from interface com.illumon.iris.binarystore.TableReader
TableReader.MissingPropertyGetterException -
Field Summary
Fields inherited from class com.illumon.iris.binarystore.AbstractBinaryStoreReader
columnNames, columnTypes, dataBuffer, mask, rowGetters, typeMetadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the input source for this TableReader.protected voidreadData(int minAmount, ByteBuffer dataBuffer) We never actually read any data in the BinaryStoreBufferProcessors, instead we have a buffer passed in by the caller.protected voidreadIntoByteBuffer(int requiredSize, ByteBuffer theBuffer) This method is called by the AbstractBinaryStoreReaderV1 when more data is needed (with the minimum size needed).voidsetDataBuffer(ByteBuffer buffer, long sentTimestamp, long recvTimestamp) The BinaryStoreBufferProcessors do not read their own data, but rather receive it externally through this call.Methods inherited from class com.illumon.iris.binarystore.AbstractBinaryStoreReaderV1
getApplicationVersion, getFlagGetter, readHeader, readRowMethods inherited from class com.illumon.iris.binarystore.AbstractBinaryStoreReader
getColumnNames, getColumnType, getGetter, getGetter, getTypeMetadataString, handleRecord, handleRow, readDataBuffer, readHeader, setRecordHandler, setRowHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.BinaryStoreBufferProcessor
delegatesRowBufferProcessing, getHeaderInfo, isDirty, setRecordHandler, setRowBufferProcessor, setRowHandlerMethods inherited from interface com.illumon.iris.binarystore.BinaryStoreReader
readHeaderMethods inherited from interface com.illumon.iris.binarystore.TableReader
getApplicationVersion, getColumnNames, getColumnType, getFlagGetter, getGetter, getGetter, getPropertyGetter, getRecordDataGetter, readAllEntries, readAllEntries, readEntry, readRow
-
Constructor Details
-
BinaryStoreBufferProcessorV1
public BinaryStoreBufferProcessorV1()
-
-
Method Details
-
close
Description copied from interface:TableReaderClose the input source for this TableReader.- Specified by:
closein interfaceTableReader- Throws:
IOException
-
readData
We never actually read any data in the BinaryStoreBufferProcessors, instead we have a buffer passed in by the caller. If we end up needing to read data, we throw an exception, indicating that there is insufficient data to read the record; and the caller should pass in additional data.- Specified by:
readDatain classAbstractBinaryStoreReader- Parameters:
minAmount- caller wants this many additional bytesdataBuffer- put the bytes in ths buffer. Must have minAmount additional capacity.- Throws:
IOException
-
readIntoByteBuffer
protected void readIntoByteBuffer(int requiredSize, ByteBuffer theBuffer) throws IOException, EofException This method is called by the AbstractBinaryStoreReaderV1 when more data is needed (with the minimum size needed). If our buffer has enough data, then we simply return. If there is not enough data, then we throw a ReadDataException, so that the caller is aware we have insufficient data to process the record, and setDataBuffer must be called with additional data before we can process the record.- Overrides:
readIntoByteBufferin classAbstractBinaryStoreReader- Parameters:
requiredSize- how many bytes of data are required to continue processingtheBuffer- the data buffer to populate- Throws:
IOException- if we encounter an EOF mid rowEofException- if no data is available from the file
-
setDataBuffer
The BinaryStoreBufferProcessors do not read their own data, but rather receive it externally through this call.- Specified by:
setDataBufferin interfaceBinaryStoreBufferProcessor- Parameters:
buffer- the buffer that the BinaryStoreProcessor should consume data from.recvTimestamp- not used in this implementationsentTimestamp- not used in this implementation
-