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
Convenience base class for Marshaller implementations which do not deepCopy and
which use variable size encodings.
- Author:
- chirino
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.store.kahadb.disk.util.Marshaller
readPayload, writePayload
-
Constructor Details
-
VariableMarshaller
public VariableMarshaller()
-
-
Method Details
-
getFixedSize
public int getFixedSize()- Specified by:
getFixedSizein 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:
isDeepCopySupportedin interfaceMarshaller<T>- Returns:
- true if the
Marshaller.deepCopy(Object)operations is supported.
-
deepCopy
- Specified by:
deepCopyin interfaceMarshaller<T>- Returns:
- a deep copy of the source object.
-