public interface SnapshotStore extends Actor, ActorLogging
Actor.emptyBehavior$, Actor.ignoringBehavior$
Modifier and Type | Method and Description |
---|---|
scala.concurrent.Future<scala.runtime.BoxedUnit> |
deleteAsync(SnapshotMetadata metadata)
Plugin API: deletes the snapshot identified by
metadata . |
scala.concurrent.Future<scala.runtime.BoxedUnit> |
deleteAsync(java.lang.String persistenceId,
SnapshotSelectionCriteria criteria)
Plugin API: deletes all snapshots matching
criteria . |
scala.concurrent.Future<scala.Option<SelectedSnapshot>> |
loadAsync(java.lang.String persistenceId,
SnapshotSelectionCriteria criteria)
Plugin API: asynchronously loads a snapshot.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receive()
This defines the initial actor behavior, it must return a partial function
with the actor logic.
|
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receivePluginInternal()
Plugin API
Allows plugin implementers to use
f pipeTo self and
handle additional messages for implementing advanced features |
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> |
receiveSnapshotStore() |
scala.concurrent.Future<scala.runtime.BoxedUnit> |
saveAsync(SnapshotMetadata metadata,
java.lang.Object snapshot)
Plugin API: asynchronously saves a snapshot.
|
ActorRef |
senderPersistentActor()
Documents intent that the sender() is expected to be the PersistentActor
|
void |
tryReceivePluginInternal(java.lang.Object evt) |
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, postStop, preRestart, preStart, self, sender, supervisorStrategy, unhandled
log
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Actor
scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveSnapshotStore()
ActorRef senderPersistentActor()
void tryReceivePluginInternal(java.lang.Object evt)
scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
If the future Option
is None
then all events will be replayed,
i.e. there was no snapshot. If snapshot could not be loaded the Future
should be completed with failure. That is important because events may
have been deleted and just replaying the events might not result in a valid
state.
This call is protected with a circuit-breaker.
persistenceId
- id of the persistent actor.criteria
- selection criteria for loading.scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata, java.lang.Object snapshot)
This call is protected with a circuit-breaker.
metadata
- snapshot metadata.snapshot
- snapshot.scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(SnapshotMetadata metadata)
metadata
.
This call is protected with a circuit-breaker.
metadata
- snapshot metadata.scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
criteria
.
This call is protected with a circuit-breaker.
persistenceId
- id of the persistent actor.criteria
- selection criteria for deleting.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receivePluginInternal()
f pipeTo self
and
handle additional messages for implementing advanced features