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 a MetadataShardDataTreeSnapshot. This class is not an interface because we want to make sure all subclasses implement the externalizable proxy pattern, for which we need to force writeReplace() to be abstract. We do that by making it final and exposing a protected externalizableProxy() 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 by PayloadVersion.

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:
  • Method Details

    • externalizableProxy

      protected abstract @NonNull Externalizable externalizableProxy()
      Return an Externalizable proxy.
      Returns:
      Externalizable proxy, may not be null
    • getType

      public abstract Class<T> getType()