Class RegularDataEncoder.IntRegularEncoder
- java.lang.Object
-
- org.apache.iotdb.tsfile.encoding.encoder.Encoder
-
- org.apache.iotdb.tsfile.encoding.encoder.RegularDataEncoder
-
- org.apache.iotdb.tsfile.encoding.encoder.RegularDataEncoder.IntRegularEncoder
-
- Enclosing class:
- RegularDataEncoder
public static class RegularDataEncoder.IntRegularEncoder extends RegularDataEncoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iotdb.tsfile.encoding.encoder.RegularDataEncoder
RegularDataEncoder.IntRegularEncoder, RegularDataEncoder.LongRegularEncoder
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.RegularDataEncoder
BLOCK_DEFAULT_SIZE, blockSize, dataTotal, isMissingPoint, out, writeIndex
-
Fields inherited from class org.apache.iotdb.tsfile.encoding.encoder.Encoder
MAX_POINT_NUMBER, MAX_STRING_LENGTH
-
-
Constructor Summary
Constructors Constructor Description IntRegularEncoder()constructor of IntRegularEncoder which is a sub-class of RegularDataEncoder.IntRegularEncoder(int size)constructor of RegularDataEncoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckMissingPoint(java.io.ByteArrayOutputStream out)voidencode(int value, java.io.ByteArrayOutputStream out)voidencodeValue(int value, java.io.ByteArrayOutputStream out)input a integer or long value.longgetMaxByteSize()The maximal possible memory size occupied by current Encoder.intgetOneItemMaxSize()When encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.protected voidreset()protected voidwriteBitmap(java.io.ByteArrayOutputStream out)protected voidwriteHeader()-
Methods inherited from class org.apache.iotdb.tsfile.encoding.encoder.RegularDataEncoder
flush, flushBlockBuffer, writeHeaderToBytes
-
-
-
-
Constructor Detail
-
IntRegularEncoder
public IntRegularEncoder()
constructor of IntRegularEncoder which is a sub-class of RegularDataEncoder.
-
IntRegularEncoder
public IntRegularEncoder(int size)
constructor of RegularDataEncoder.- Parameters:
size- - the number how many numbers to be packed into a block.
-
-
Method Detail
-
reset
protected void reset()
- Specified by:
resetin classRegularDataEncoder
-
writeHeader
protected void writeHeader() throws java.io.IOException- Specified by:
writeHeaderin classRegularDataEncoder- Throws:
java.io.IOException
-
encode
public void encode(int value, java.io.ByteArrayOutputStream out)
-
getOneItemMaxSize
public int getOneItemMaxSize()
Description copied from class:EncoderWhen encoder accepts a new incoming data point, the maximal possible size in byte it takes to store in memory.- Overrides:
getOneItemMaxSizein classEncoder- Returns:
- the maximal possible size of one data item encoded by this encoder
-
getMaxByteSize
public long getMaxByteSize()
Description copied from class:EncoderThe maximal possible memory size occupied by current Encoder. This statistic value doesn't involve OutputStream.- Overrides:
getMaxByteSizein classEncoder- Returns:
- the maximal size of possible memory occupied by current encoder
-
checkMissingPoint
protected void checkMissingPoint(java.io.ByteArrayOutputStream out) throws java.io.IOException- Specified by:
checkMissingPointin classRegularDataEncoder- Throws:
java.io.IOException
-
writeBitmap
protected void writeBitmap(java.io.ByteArrayOutputStream out) throws java.io.IOException- Specified by:
writeBitmapin classRegularDataEncoder- Throws:
java.io.IOException
-
encodeValue
public void encodeValue(int value, java.io.ByteArrayOutputStream out) throws java.io.IOExceptioninput a integer or long value.- Parameters:
value- value to encodeout- - the ByteArrayOutputStream which data encode into- Throws:
java.io.IOException
-
-