Interface StateSnapshot
- All Superinterfaces:
Immutable
- All Known Subinterfaces:
Snapshot.State
- All Known Implementing Classes:
EmptyState
,ShardSnapshotState
Marker interface for objects representing a snapshot of RAFT-replicated user state. A
StateSnapshot
represents a logical sum of all StateCommand
s applied to the journal at a particular point in time.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
StateSnapshot.Reader<T extends StateSnapshot>
static interface
StateSnapshot.Support<T extends StateSnapshot>
A combination of aStateSnapshot.Reader
and aStateSnapshot.Writer
for a concreteStateSnapshot
type, as indicated byStateSnapshot.Support.snapshotType()
.static final class
StateSnapshot.ToStorage<T extends StateSnapshot>
AStateSnapshot
on its way to storage.static interface
StateSnapshot.Writer<T extends StateSnapshot>
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Indicate whether the snapshot requires migration, i.e. a new snapshot should be created after recovery.
-
Method Details
-
needsMigration
default boolean needsMigration()Indicate whether the snapshot requires migration, i.e. a new snapshot should be created after recovery. Default implementation returnsfalse
, i.e. do not re-snapshot.- Returns:
true
if complete recovery based upon this snapshot should trigger a new snapshot.
-