public abstract class ShardDataTreeSnapshotMetadata<T extends ShardDataTreeSnapshotMetadata<T>> extends Object implements Serializable
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.
Modifier and Type | Method and Description |
---|---|
protected abstract Externalizable |
externalizableProxy()
Return an Externalizable proxy.
|
abstract Class<T> |
getType() |
@Nonnull protected abstract Externalizable externalizableProxy()
Copyright © 2019 OpenDaylight. All rights reserved.