com.bigdata.service
Class TxId2CommitTimeIndex.TupleSerializer

java.lang.Object
  extended by com.bigdata.btree.DefaultTupleSerializer<Long,Long>
      extended by com.bigdata.service.TxId2CommitTimeIndex.TupleSerializer
All Implemented Interfaces:
ITupleSerializer<Long,Long>, IKeyBuilderFactory, Externalizable, Serializable
Enclosing class:
TxId2CommitTimeIndex

protected static class TxId2CommitTimeIndex.TupleSerializer
extends DefaultTupleSerializer<Long,Long>

Encapsulates key and value formation.

Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
TxId2CommitTimeIndex.TupleSerializer()
          De-serialization ctor.
TxId2CommitTimeIndex.TupleSerializer(IKeyBuilderFactory keyBuilderFactory)
          Ctor when creating a new instance.
 
Method Summary
 Long deserialize(ITuple tuple)
          Decodes the value as a commit time.
 Long deserializeKey(ITuple tuple)
          Decodes the key as a transaction identifier.
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.bigdata.btree.DefaultTupleSerializer
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, newInstance, serializeKey, serializeVal, setLeafKeysCoder, setLeafValuesCoder, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TxId2CommitTimeIndex.TupleSerializer

public TxId2CommitTimeIndex.TupleSerializer()
De-serialization ctor.


TxId2CommitTimeIndex.TupleSerializer

public TxId2CommitTimeIndex.TupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Ctor when creating a new instance.

Parameters:
keyBuilderFactory -
Method Detail

deserializeKey

public Long deserializeKey(ITuple tuple)
Decodes the key as a transaction identifier.

Specified by:
deserializeKey in interface ITupleSerializer<Long,Long>
Overrides:
deserializeKey in class DefaultTupleSerializer<Long,Long>

deserialize

public Long deserialize(ITuple tuple)
Decodes the value as a commit time.

Specified by:
deserialize in interface ITupleSerializer<Long,Long>
Overrides:
deserialize in class DefaultTupleSerializer<Long,Long>
Parameters:
tuple - The tuple.
Returns:
The de-serialized object.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class DefaultTupleSerializer<Long,Long>
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class DefaultTupleSerializer<Long,Long>
Throws:
IOException


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.