|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.DefaultTupleSerializer
com.bigdata.btree.NOPTupleSerializer
public class NOPTupleSerializer
Default implementation uses the 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.
| Field Summary | |
|---|---|
static ITupleSerializer |
INSTANCE
|
| Constructor Summary | |
|---|---|
NOPTupleSerializer()
De-serialization ctor. |
|
NOPTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Normally callers will use an ASCIIKeyBuilderFactory since
Unicode support is not required |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class com.bigdata.btree.DefaultTupleSerializer |
|---|
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final transient ITupleSerializer INSTANCE
| Constructor Detail |
|---|
public NOPTupleSerializer()
public NOPTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
ASCIIKeyBuilderFactory since
Unicode support is not required
keyBuilderFactory - ASCIIKeyBuilderFactory| Method Detail |
|---|
public 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)
DefaultTupleSerializer
serializeVal 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 DefaultTupleSerializerIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializerIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||