public class NOPTupleSerializer extends DefaultTupleSerializer
KeyBuilder to format the object as a
key and requires that the values are byte[]s which it passes on without
change. Deserialization of the tuple value always the byte[] itself.| Modifier and Type | Field and Description |
|---|---|
static ITupleSerializer |
INSTANCE |
| Constructor and Description |
|---|
NOPTupleSerializer()
De-serialization ctor.
|
NOPTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Normally callers will use an
ASCIIKeyBuilderFactory since
Unicode support is not required |
| Modifier and Type | Method and Description |
|---|---|
Object |
deserialize(ITuple tuple)
De-serializes an object from the
value stored
in the tuple (ignores the key stored in the tuple). |
Object |
deserializeKey(ITuple tuple)
This is an unsupported operation.
|
void |
readExternal(ObjectInput in) |
byte[] |
serializeKey(Object obj)
Serialize a facet of an object's state that places the object into the
total sort order for the index.
|
byte[] |
serializeVal(Object obj)
Serializes the object as a byte[] using Java default serialization.
|
void |
writeExternal(ObjectOutput out) |
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, getPrimaryKeyBuilder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toStringpublic static final transient ITupleSerializer INSTANCE
public NOPTupleSerializer()
public NOPTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
ASCIIKeyBuilderFactory since
Unicode support is not requiredkeyBuilderFactory - ASCIIKeyBuilderFactorypublic byte[] serializeKey(Object obj)
IAutoboxBTree.insert(Object, Object) and friends to convert the
key object into an unsigned variable
length byte[].
Note: This handles the conversion between an object and the
unsigned variable length byte[] representation of that
object which determines its place within the total index order. Since
this transform imposes the total order of the index, different techniques
are applied here than are applied to the serialization of the index
values.
Return obj iff it is a byte[] and otherwise converts
obj to a byte[] using IKeyBuilder.append(Object).
serializeKey in interface ITupleSerializerserializeKey in class DefaultTupleSerializerobj - A object (MAY NOT be null).null (
null keys are not allowed into an index).public byte[] serializeVal(Object obj)
DefaultTupleSerializerserializeVal in interface ITupleSerializerserializeVal in class DefaultTupleSerializerobj - The object to be serialized (MAY be null).null if the reference is null.public Object deserialize(ITuple tuple)
DefaultTupleSerializervalue stored
in the tuple (ignores the key stored in the tuple).deserialize in interface ITupleSerializerdeserialize in class DefaultTupleSerializertuple - The tuple.public Object deserializeKey(ITuple tuple)
ITupleSerializer or you can specialize
this one so that it can de-serialize your keys using whichever approach
makes the most sense for your data.deserializeKey in interface ITupleSerializerdeserializeKey in class DefaultTupleSerializerUnsupportedOperationException - always.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DefaultTupleSerializerIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializerIOExceptionCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.