Class ShardSnapshotState
java.lang.Object
org.opendaylight.controller.cluster.datastore.persisted.ShardSnapshotState
- All Implemented Interfaces:
Serializable,Snapshot.State,StateSnapshot,Immutable
Encapsulates the snapshot State for a Shard.
- Author:
- Thomas Pantelis
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.controller.cluster.raft.spi.StateSnapshot
StateSnapshot.Reader<T extends StateSnapshot>, StateSnapshot.Support<T extends StateSnapshot>, StateSnapshot.ToStorage<T extends StateSnapshot>, StateSnapshot.Writer<T extends StateSnapshot> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionShardSnapshotState(@NonNull ShardDataTreeSnapshot snapshot) ShardSnapshotState(@NonNull ShardDataTreeSnapshot snapshot, boolean migrated) -
Method Summary
Modifier and TypeMethodDescription@NonNull ShardDataTreeSnapshotbooleanIndicate whether the snapshot requires migration, i.e. a new snapshot should be created after recovery.
-
Field Details
-
SUPPORT
-
-
Constructor Details
-
ShardSnapshotState
-
ShardSnapshotState
-
-
Method Details
-
getSnapshot
-
needsMigration
public boolean needsMigration()Description copied from interface:StateSnapshotIndicate whether the snapshot requires migration, i.e. a new snapshot should be created after recovery. Default implementation returnsfalse, i.e. do not re-snapshot.- Specified by:
needsMigrationin interfaceStateSnapshot- Returns:
trueif complete recovery based upon this snapshot should trigger a new snapshot.
-