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 Details

    • VariableMarshaller

      public VariableMarshaller()
  • Method Details

    • 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.