Class AbstractIdentifiablePayload<T extends Identifier>

All Implemented Interfaces:
Serializable, StateCommand, StateMachineCommand, Identifiable<T>, Immutable
Direct Known Subclasses:
AbortTransactionPayload, CloseLocalHistoryPayload, CreateLocalHistoryPayload, DisableTrackingPayload, PurgeLocalHistoryPayload, PurgeTransactionPayload, SkipTransactionsPayload

public abstract class AbstractIdentifiablePayload<T extends Identifier> extends IdentifiablePayload<T>
Abstract base class for IdentifiablePayloads which hold a single Identifier.
See Also:
  • Method Details

    • getIdentifier

      public final T getIdentifier()
    • size

      public final int size()
      Description copied from class: Payload
      Return the estimate of in-memory size of this payload.
      Specified by:
      size in class Payload
      Returns:
      An estimate of the in-memory size of this payload.
    • serialized

      protected final byte @NonNull [] serialized()
    • serializedSize

      public final int serializedSize()
      Description copied from class: Payload
      Return the estimate of serialized size of this payload when passed through serialization. The estimate needs to be reasonably accurate and should err on the side of caution and report a slightly-higher size in face of uncertainty.
      Specified by:
      serializedSize in class Payload
      Returns:
      An estimate of serialized size.
    • writeReplace

      protected final Object writeReplace()
      Description copied from class: Payload
      Return the serialization proxy for this object.
      Specified by:
      writeReplace in class Payload
      Returns:
      Serialization proxy
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • externalizableProxy

      protected abstract @NonNull AbstractIdentifiablePayload.SerialForm externalizableProxy(byte @NonNull [] serialized)
    • externalizableProxySize

      protected abstract int externalizableProxySize()
    • externalizableProxySize

      protected static final int externalizableProxySize(Function<byte[],? extends AbstractIdentifiablePayload.SerialForm> constructor)