public abstract class AbstractForwardIndexAccessor<Key,Value,DataType> extends java.lang.Object implements ForwardIndexAccessor<Key,Value>
Constructor and Description |
---|
AbstractForwardIndexAccessor(DataExternalizer<DataType> externalizer) |
Modifier and Type | Method and Description |
---|---|
abstract DataType |
convertToDataType(InputData<Key,Value> data) |
protected abstract InputDataDiffBuilder<Key,Value> |
createDiffBuilder(int inputId,
DataType inputData) |
DataType |
deserializeData(ByteArraySequence sequence) |
static <Data> Data |
deserializeFromByteSeq(ByteArraySequence bytes,
DataExternalizer<Data> externalizer) |
protected int |
getBufferInitialSize(DataType dataType) |
InputDataDiffBuilder<Key,Value> |
getDiffBuilder(int inputId,
ByteArraySequence sequence)
creates a diff builder for given inputId.
|
ByteArraySequence |
serializeIndexedData(DataType data) |
ByteArraySequence |
serializeIndexedData(InputData<Key,Value> data)
serialize indexed data to forward index format.
|
static <Data> ByteArraySequence |
serializeToByteSeq(Data data,
DataExternalizer<Data> externalizer,
int bufferInitialSize) |
public AbstractForwardIndexAccessor(DataExternalizer<DataType> externalizer)
protected abstract InputDataDiffBuilder<Key,Value> createDiffBuilder(int inputId, DataType inputData) throws java.io.IOException
java.io.IOException
public DataType deserializeData(ByteArraySequence sequence) throws java.io.IOException
java.io.IOException
public InputDataDiffBuilder<Key,Value> getDiffBuilder(int inputId, ByteArraySequence sequence) throws java.io.IOException
ForwardIndexAccessor
getDiffBuilder
in interface ForwardIndexAccessor<Key,Value>
java.io.IOException
public ByteArraySequence serializeIndexedData(InputData<Key,Value> data) throws java.io.IOException
ForwardIndexAccessor
serializeIndexedData
in interface ForwardIndexAccessor<Key,Value>
java.io.IOException
public ByteArraySequence serializeIndexedData(DataType data) throws java.io.IOException
java.io.IOException
protected int getBufferInitialSize(DataType dataType)
public static <Data> ByteArraySequence serializeToByteSeq(Data data, DataExternalizer<Data> externalizer, int bufferInitialSize) throws java.io.IOException
java.io.IOException
public static <Data> Data deserializeFromByteSeq(ByteArraySequence bytes, DataExternalizer<Data> externalizer) throws java.io.IOException
java.io.IOException