public class SchemaVersionOne extends Object implements ISchemaVersion
ISchemaVersion representing schema version one.| Modifier and Type | Field and Description |
|---|---|
static int |
SCHEMA_VERSION
The schema version number for this instance.
|
| Constructor and Description |
|---|
SchemaVersionOne() |
| Modifier and Type | Method and Description |
|---|---|
IWordDeserializer |
getDeserializer(HLLType type,
int wordLength,
byte[] bytes)
Builds an HLL deserializer that matches this schema version.
|
IWordSerializer |
getSerializer(HLLType type,
int wordLength,
int wordCount)
Builds an HLL serializer that matches this schema version.
|
int |
paddingBytes(HLLType type)
The number of metadata bytes required for a serialized HLL of the
specified type.
|
IHLLMetadata |
readMetadata(byte[] bytes)
Reads the metadata bytes of the serialized HLL.
|
int |
schemaVersionNumber() |
void |
writeMetadata(byte[] bytes,
IHLLMetadata metadata)
Writes metadata bytes to serialized HLL.
|
public static final int SCHEMA_VERSION
public int paddingBytes(HLLType type)
ISchemaVersionpaddingBytes in interface ISchemaVersiontype - the type of the serialized HLLpublic void writeMetadata(byte[] bytes,
IHLLMetadata metadata)
ISchemaVersionwriteMetadata in interface ISchemaVersionbytes - the padded data bytes of the HLLmetadata - the metadata to write to the padding bytespublic IHLLMetadata readMetadata(byte[] bytes)
ISchemaVersionreadMetadata in interface ISchemaVersionbytes - the serialized HLLpublic IWordSerializer getSerializer(HLLType type, int wordLength, int wordCount)
ISchemaVersiongetSerializer in interface ISchemaVersiontype - the HLL type that will be serialized. This cannot be
null.wordLength - the length of the 'words' that comprise the data of the
HLL. Words must be at least 5 bits and at most 64 bits long.wordCount - the number of 'words' in the HLL's data.ISchemaVersion.paddingBytes(HLLType),
IWordSerializerpublic IWordDeserializer getDeserializer(HLLType type, int wordLength, byte[] bytes)
ISchemaVersiongetDeserializer in interface ISchemaVersiontype - the HLL type that will be deserialized. This cannot be
null.wordLength - the length of the 'words' that comprise the data of the
serialized HLL. Words must be at least 5 bits and at most 64
bits long.bytes - the serialized HLL to deserialize. This cannot be
null.public int schemaVersionNumber()
schemaVersionNumber in interface ISchemaVersionCopyright © 2014. All rights reserved.