public class HistoryIndexTupleSerializer extends DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
IChangeRecord
s for the history index.Constructor and Description |
---|
HistoryIndexTupleSerializer()
De-serialization constructor.
|
HistoryIndexTupleSerializer(SPOKeyOrder keyOrder,
boolean sids)
Create an
ITupleSerializer for the indicated access path. |
HistoryIndexTupleSerializer(SPOKeyOrder keyOrder,
boolean sids,
IRabaCoder leafKeySer,
IRabaCoder leafValSer)
Create an
ITupleSerializer for the indicated access path. |
Modifier and Type | Method and Description |
---|---|
HistoryChangeRecord |
deserialize(ITuple tuple)
De-serializes an object from the
value stored
in the tuple (ignores the key stored in the tuple). |
HistoryChangeRecord |
deserializeKey(ITuple tuple)
This is an unsupported operation.
|
void |
readExternal(ObjectInput in) |
byte[] |
serializeKey(HistoryChangeRecord changeRecord) |
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(HistoryChangeRecord changeRecord)
Serializes the object as a byte[] using Java default serialization.
|
void |
writeExternal(ObjectOutput out) |
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, getPrimaryKeyBuilder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toString
public HistoryIndexTupleSerializer()
public HistoryIndexTupleSerializer(SPOKeyOrder keyOrder, boolean sids)
ITupleSerializer
for the indicated access path.keyOrder
- The key order for the (s,p,o[,c]) component of the key.public HistoryIndexTupleSerializer(SPOKeyOrder keyOrder, boolean sids, IRabaCoder leafKeySer, IRabaCoder leafValSer)
ITupleSerializer
for the indicated access path.keyOrder
- The access path.sids
- If true, attach sids to decoded SPOs where appropriate.leafKeySer
- leafValSer
- public byte[] serializeKey(Object obj)
ITupleSerializer
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.
serializeKey
in interface ITupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
serializeKey
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
obj
- A object (MAY NOT be null
).null
(
null
keys are not allowed into an index).public byte[] serializeKey(HistoryChangeRecord changeRecord)
public byte[] serializeVal(HistoryChangeRecord changeRecord)
DefaultTupleSerializer
serializeVal
in interface ITupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
serializeVal
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
changeRecord
- The object to be serialized (MAY be null
).null
if the reference is null
.public HistoryChangeRecord deserializeKey(ITuple tuple)
DefaultTupleSerializer
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 ITupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
deserializeKey
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
public HistoryChangeRecord deserialize(ITuple tuple)
DefaultTupleSerializer
value
stored
in the tuple (ignores the key stored in the tuple).deserialize
in interface ITupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
deserialize
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
tuple
- The tuple.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class DefaultTupleSerializer<HistoryChangeRecord,HistoryChangeRecord>
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.