com.bigdata.journal
Class Name2Addr.Name2AddrTupleSerializer

java.lang.Object
  extended by com.bigdata.btree.DefaultTupleSerializer<String,Name2Addr.Entry>
      extended by com.bigdata.journal.Name2Addr.Name2AddrTupleSerializer
All Implemented Interfaces:
ITupleSerializer<String,Name2Addr.Entry>, IKeyBuilderFactory, Externalizable, Serializable
Enclosing class:
Name2Addr

public static class Name2Addr.Name2AddrTupleSerializer
extends DefaultTupleSerializer<String,Name2Addr.Entry>

Encapsulates key and value formation for Name2Addr.

Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
Name2Addr.Name2AddrTupleSerializer()
          De-serialization ctor.
Name2Addr.Name2AddrTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
          Ctor when creating a new instance.
 
Method Summary
 Name2Addr.Entry deserialize(ITuple tuple)
          De-serializes an object from the value stored in the tuple (ignores the key stored in the tuple).
 void readExternal(ObjectInput in)
           
 byte[] serializeKey(Object obj)
          Return the unsigned byte[] key for an index name.
 byte[] serializeVal(Name2Addr.Entry entry)
          Return the byte[] value an Name2Addr.Entry.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.bigdata.btree.DefaultTupleSerializer
deserializeKey, 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
 

Constructor Detail

Name2Addr.Name2AddrTupleSerializer

public Name2Addr.Name2AddrTupleSerializer()
De-serialization ctor.


Name2Addr.Name2AddrTupleSerializer

public Name2Addr.Name2AddrTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Ctor when creating a new instance.

Parameters:
keyBuilderFactory -
Method Detail

serializeKey

public byte[] serializeKey(Object obj)
Return the unsigned byte[] key for an index name.

Specified by:
serializeKey in interface ITupleSerializer<String,Name2Addr.Entry>
Overrides:
serializeKey in class DefaultTupleSerializer<String,Name2Addr.Entry>
Parameters:
obj - The name of an index.
Returns:
An unsigned byte[] which places the object into the total sort order for the index and never null ( null keys are not allowed into an index).

serializeVal

public byte[] serializeVal(Name2Addr.Entry entry)
Return the byte[] value an Name2Addr.Entry.

Specified by:
serializeVal in interface ITupleSerializer<String,Name2Addr.Entry>
Overrides:
serializeVal in class DefaultTupleSerializer<String,Name2Addr.Entry>
Parameters:
entry - An Entry.
Returns:
The serialized representation of the object as a byte[] -or- null if the reference is null.

deserialize

public Name2Addr.Entry deserialize(ITuple tuple)
Description copied from class: DefaultTupleSerializer
De-serializes an object from the value stored in the tuple (ignores the key stored in the tuple).

Specified by:
deserialize in interface ITupleSerializer<String,Name2Addr.Entry>
Overrides:
deserialize in class DefaultTupleSerializer<String,Name2Addr.Entry>
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<String,Name2Addr.Entry>
Throws:
IOException
ClassNotFoundException

writeExternal

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


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