Class VariableMarshaller<T>
- java.lang.Object
-
- org.apache.activemq.store.kahadb.disk.util.VariableMarshaller<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Marshaller<T>
- Direct Known Subclasses:
BTreeNode.Marshaller
,ListNode.NodeMarshaller
,MessageDatabase.MessageKeysMarshaller
,MessageDatabase.MessageStoreStatisticsMarshaller
,MessageDatabase.StoredDestinationMarshaller
,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
-
-
Constructor Summary
Constructors Constructor Description VariableMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
deepCopy(T source)
int
getFixedSize()
boolean
isDeepCopySupported()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.store.kahadb.disk.util.Marshaller
readPayload, writePayload
-
-
-
-
Method Detail
-
getFixedSize
public int getFixedSize()
- Specified by:
getFixedSize
in interfaceMarshaller<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 interfaceMarshaller<T>
- Returns:
- true if the
Marshaller.deepCopy(Object)
operations is supported.
-
deepCopy
public T deepCopy(T source)
- Specified by:
deepCopy
in interfaceMarshaller<T>
- Returns:
- a deep copy of the source object.
-
-