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 forIdentifiablePayload
s which hold a singleIdentifier
.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractIdentifiablePayload.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 int
externalizableProxySize()
protected static int
externalizableProxySize(Function<byte[],? extends AbstractIdentifiablePayload.AbstractProxy<?>> constructor)
T
getIdentifier()
int
serializedSize()
Return the estimate of serialized size of this payload when passed through serialization.int
size()
Return the estimate of in-memory size of this payload.String
toString()
protected Object
writeReplace()
Return the serialization proxy for this object.
-
-
-
Method Detail
-
getIdentifier
public final T getIdentifier()
- Specified by:
getIdentifier
in interfaceIdentifiable<T extends Identifier>
-
size
public final int size()
Description copied from class:Payload
Return the estimate of in-memory size of this payload.
-
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 classPayload
- 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 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)
-
-