org.apache.kahadb.util
Interface Marshaller<T>
- All Known Implementing Classes:
- BTreeNode.Marshaller, BytesMarshaller, IntegerMarshaller, LongMarshaller, MessageDatabase.LastAckMarshaller, MessageDatabase.MessageKeysMarshaller, MessageDatabase.StoredDestinationMarshaller, ObjectMarshaller, SequenceSet.Marshaller, StringMarshaller, TempMessageDatabase.MessageKeysMarshaller, TempMessageDatabase.StoredDestinationMarshaller, VariableMarshaller
public interface Marshaller<T>
writePayload
void writePayload(T object,
java.io.DataOutput dataOut)
throws java.io.IOException
- Write the payload of the object to the DataOutput stream.
- Parameters:
object
- dataOut
-
- Throws:
java.io.IOException
readPayload
T readPayload(java.io.DataInput dataIn)
throws java.io.IOException
- Read the payload of the object from the DataInput stream.
- Parameters:
dataIn
-
- Returns:
- unmarshalled object
- Throws:
java.io.IOException
getFixedSize
int getFixedSize()
- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
isDeepCopySupported
boolean isDeepCopySupported()
- Returns:
- true if the
deepCopy(Object)
operations is supported.
deepCopy
T deepCopy(T source)
- Returns:
- a deep copy of the source object.
Copyright © 2005-2012. All Rights Reserved.