Class AbstractIdentifiablePayload<T extends Identifier>
- java.lang.Object
-
- org.opendaylight.controller.cluster.raft.messages.Payload
-
- org.opendaylight.controller.cluster.raft.messages.IdentifiablePayload<T>
-
- org.opendaylight.controller.cluster.datastore.persisted.AbstractIdentifiablePayload<T>
-
- All Implemented Interfaces:
Serializable,Identifiable<T>
- Direct Known Subclasses:
AbortTransactionPayload,CloseLocalHistoryPayload,CreateLocalHistoryPayload,DisableTrackingPayload,PurgeLocalHistoryPayload,PurgeTransactionPayload,SkipTransactionsPayload
public abstract class AbstractIdentifiablePayload<T extends Identifier> extends IdentifiablePayload<T> implements Serializable
Abstract base class forIdentifiablePayloads which hold a singleIdentifier.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractIdentifiablePayload.AbstractProxy<T extends Identifier>
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @NonNull AbstractIdentifiablePayload.AbstractProxy<T>externalizableProxy(byte @NonNull [] serialized)protected abstract intexternalizableProxySize()protected static intexternalizableProxySize(Function<byte[],? extends AbstractIdentifiablePayload.AbstractProxy<?>> constructor)TgetIdentifier()intserializedSize()Return the estimate of serialized size of this payload when passed through serialization.intsize()Return the estimate of in-memory size of this payload.StringtoString()protected ObjectwriteReplace()Return the serialization proxy for this object.
-
-
-
Method Detail
-
getIdentifier
public final T getIdentifier()
- Specified by:
getIdentifierin interfaceIdentifiable<T extends Identifier>
-
size
public final int size()
Description copied from class:PayloadReturn the estimate of in-memory size of this payload.
-
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
protected final Object writeReplace()
Description copied from class:PayloadReturn the serialization proxy for this object.- Specified by:
writeReplacein classPayload- Returns:
- Serialization proxy
-
externalizableProxy
protected abstract @NonNull AbstractIdentifiablePayload.AbstractProxy<T> externalizableProxy(byte @NonNull [] serialized)
-
externalizableProxySize
protected abstract int externalizableProxySize()
-
externalizableProxySize
protected static final int externalizableProxySize(Function<byte[],? extends AbstractIdentifiablePayload.AbstractProxy<?>> constructor)
-
-