Class ShardDataTreeSnapshotMetadata<T extends ShardDataTreeSnapshotMetadata<T>>
- java.lang.Object
-
- org.opendaylight.controller.cluster.datastore.persisted.ShardDataTreeSnapshotMetadata<T>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FrontendShardDataTreeSnapshotMetadata
public abstract class ShardDataTreeSnapshotMetadata<T extends ShardDataTreeSnapshotMetadata<T>> extends Object implements Serializable
Base class for various bits of metadata attached to aMetadataShardDataTreeSnapshot
. This class is not an interface because we want to make sure all subclasses implement the externalizable proxy pattern, for which we need to forcewriteReplace()
to be abstract. We do that by making it final and exposing a protectedexternalizableProxy()
method.All concrete subclasses of this class should be final so as to form a distinct set of possible metadata. Since metadata is serialized along with
MetadataShardDataTreeSnapshot
, this set is part of the serialization format guarded byPayloadVersion
.If a new metadata type is introduced or a type is removed,
PayloadVersion
needs to be bumped to ensure compatibility.- Author:
- Robert Varga
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract @NonNull Externalizable
externalizableProxy()
Return an Externalizable proxy.abstract Class<T>
getType()
-
-
-
Method Detail
-
externalizableProxy
protected abstract @NonNull Externalizable externalizableProxy()
Return an Externalizable proxy.- Returns:
- Externalizable proxy, may not be null
-
-