Class BigEndianAscendingWordDeserializer
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.stat.hll.serialization.BigEndianAscendingWordDeserializer
-
- All Implemented Interfaces:
IWordDeserializer
public class BigEndianAscendingWordDeserializer extends Object implements IWordDeserializer
A corresponding deserializer forBigEndianAscendingWordSerializer.
-
-
Constructor Summary
Constructors Constructor Description BigEndianAscendingWordDeserializer(int wordLength, int bytePadding, byte[] bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longreadWord()inttotalWordCount()Returns the number of words that could be encoded in the sequence.
-
-
-
Constructor Detail
-
BigEndianAscendingWordDeserializer
public BigEndianAscendingWordDeserializer(int wordLength, int bytePadding, byte[] bytes)- Parameters:
wordLength- the length in bits of the words to be deserialized. Must be less than or equal to 64 and greater than or equal to 1.bytePadding- the number of leading bytes that pad the serialized words. Must be greater than or equal to zero.bytes- the byte array containing the serialized words. Cannot benull.
-
-
Method Detail
-
readWord
public long readWord()
- Specified by:
readWordin interfaceIWordDeserializer- Returns:
- the next word in the sequence. Should not be called more than
IWordDeserializer.totalWordCount()times.
-
totalWordCount
public int totalWordCount()
Description copied from interface:IWordDeserializerReturns the number of words that could be encoded in the sequence. NOTE: the sequence that was encoded may be shorter than the value this method returns due to padding issues within bytes. This guarantees only an upper bound on the number of timesIWordDeserializer.readWord()can be called.- Specified by:
totalWordCountin interfaceIWordDeserializer- Returns:
- the maximum number of words that could be read from the sequence.
-
-