Class ValueBlockV1Encoder
java.lang.Object
io.datarouter.filesystem.snapshot.block.value.ValueBlockV1Encoder
- All Implemented Interfaces:
BlockEncoder,DataBlockEncoder,ValueBlockEncoder
public class ValueBlockV1Encoder extends java.lang.Object implements ValueBlockEncoder
-
Constructor Summary
Constructors Constructor Description ValueBlockV1Encoder() -
Method Summary
Modifier and Type Method Description voidadd(SnapshotEntry entry, int column)EncodedBlockencode()java.lang.Stringformat()intnumBytes()Used to determine when to flush a block.intnumRecords()The number of items in the block.
-
Constructor Details
-
ValueBlockV1Encoder
public ValueBlockV1Encoder()
-
-
Method Details
-
add
- Specified by:
addin interfaceValueBlockEncoder
-
format
public java.lang.String format()- Specified by:
formatin interfaceBlockEncoder
-
numRecords
public int numRecords()Description copied from interface:DataBlockEncoderThe number of items in the block. Zero indicates we don't need to flush it.- Specified by:
numRecordsin interfaceDataBlockEncoder
-
numBytes
public int numBytes()Description copied from interface:DataBlockEncoderUsed to determine when to flush a block. We won't always know the exact block size until we actually encode it.- Specified by:
numBytesin interfaceDataBlockEncoder
-
encode
- Specified by:
encodein interfaceValueBlockEncoder
-