Package org.apache.pekko.persistence
Interface Snapshotter
- All Superinterfaces:
Actor
- All Known Subinterfaces:
AbstractPersistentActorLike
,AtLeastOnceDelivery
,AtLeastOnceDeliveryLike
,Eventsourced
,PersistentActor
,PersistentFSM<S,
D, E>
- All Known Implementing Classes:
AbstractPersistentActor
,AbstractPersistentActorWithAtLeastOnceDelivery
,AbstractPersistentActorWithTimers
,AbstractPersistentFSM
,AbstractPersistentLoggingFSM
,JournalPerfSpec.BenchActor
,PersistentShardCoordinator
Snapshot API on top of the internal snapshot protocol.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteSnapshot
(long sequenceNr) Deletes the snapshot identified bysequenceNr
.void
deleteSnapshots
(SnapshotSelectionCriteria criteria) Deletes all snapshots matchingcriteria
.void
loadSnapshot
(String persistenceId, SnapshotSelectionCriteria criteria, long toSequenceNr) Instructs the snapshot store to load the specified snapshot and send it via anSnapshotOffer
to the runningPersistentActor
.void
saveSnapshot
(Object snapshot) Saves asnapshot
of this snapshotter's state.long
Sequence number to use when taking a snapshot.Snapshot store plugin actor.Snapshotter id.Methods inherited from interface org.apache.pekko.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, postStop, preRestart, preStart, receive, self, sender, supervisorStrategy, unhandled
-
Method Details
-
deleteSnapshot
void deleteSnapshot(long sequenceNr) Deletes the snapshot identified bysequenceNr
.The
PersistentActor
will be notified about the status of the deletion via anDeleteSnapshotSuccess
orDeleteSnapshotFailure
message. -
deleteSnapshots
Deletes all snapshots matchingcriteria
.The
PersistentActor
will be notified about the status of the deletion via anDeleteSnapshotsSuccess
orDeleteSnapshotsFailure
message. -
loadSnapshot
Instructs the snapshot store to load the specified snapshot and send it via anSnapshotOffer
to the runningPersistentActor
. -
saveSnapshot
Saves asnapshot
of this snapshotter's state.The
PersistentActor
will be notified about the success or failure of this via anSaveSnapshotSuccess
orSaveSnapshotFailure
message. -
snapshotSequenceNr
long snapshotSequenceNr()Sequence number to use when taking a snapshot. -
snapshotStore
ActorRef snapshotStore()Snapshot store plugin actor. -
snapshotterId
String snapshotterId()Snapshotter id.
-