org.apache.kahadb.util
Class VariableMarshaller<T>
java.lang.Object
org.apache.kahadb.util.VariableMarshaller<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Marshaller<T>
- Direct Known Subclasses:
- BTreeNode.Marshaller, MessageDatabase.MessageKeysMarshaller, MessageDatabase.StoredDestinationMarshaller, ObjectMarshaller, TempMessageDatabase.MessageKeysMarshaller, TempMessageDatabase.StoredDestinationMarshaller
public abstract class VariableMarshaller<T>
- extends Object
- implements Marshaller<T>
Convenience base class for Marshaller implementations which do not deepCopy and
which use variable size encodings.
- Author:
- chirino
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableMarshaller
public VariableMarshaller()
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSize
in interface Marshaller<T>
- Returns:
- -1 if the object do not always marshall to a fixed size, otherwise return that fixed size.
isDeepCopySupported
public boolean isDeepCopySupported()
- Specified by:
isDeepCopySupported
in interface Marshaller<T>
- Returns:
- true if the
Marshaller.deepCopy(Object)
operations is supported.
deepCopy
public T deepCopy(T source)
- Specified by:
deepCopy
in interface Marshaller<T>
- Returns:
- a deep copy of the source object.
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.