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