Class AbstractIdentifiablePayload<T extends Identifier>
java.lang.Object
org.opendaylight.controller.cluster.raft.messages.Payload
org.opendaylight.controller.cluster.raft.spi.AbstractStateCommand
org.opendaylight.controller.cluster.raft.messages.IdentifiablePayload<T>
org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifiablePayload<T>
- 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceAnExternalizablewith default implementations we expect our implementations to comply with.Nested classes/interfaces inherited from interface org.opendaylight.controller.cluster.raft.spi.StateMachineCommand
StateMachineCommand.Reader<T extends StateMachineCommand>, StateMachineCommand.Support<T extends StateMachineCommand>, StateMachineCommand.Writer<T extends StateMachineCommand> -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @NonNull AbstractIdentifiablePayload.SerialFormexternalizableProxy(byte @NonNull [] serialized) protected abstract intprotected static final intexternalizableProxySize(Function<byte[], ? extends AbstractIdentifiablePayload.SerialForm> constructor) final Tprotected final byte @NonNull []final intReturn the estimate of serialized size of this payload when passed through serialization.final intsize()Return the estimate of in-memory size of this payload.final StringtoString()protected final ObjectReturn the serialization proxy for this object.Methods inherited from class org.opendaylight.controller.cluster.raft.messages.Payload
toSerialFormMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opendaylight.controller.cluster.raft.spi.StateMachineCommand
toSerialForm
-
Method Details
-
getIdentifier
-
size
public final int size()Description copied from class:PayloadReturn the estimate of in-memory size of this payload. -
serialized
protected final byte @NonNull [] serialized() -
serializedSize
public final int serializedSize()Description copied from class:PayloadReturn 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:
serializedSizein classPayload- Returns:
- An estimate of serialized size.
-
writeReplace
Description copied from class:PayloadReturn the serialization proxy for this object.- Specified by:
writeReplacein classPayload- Returns:
- Serialization proxy
-
toString
-
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)
-