public final class NoSnapshotStore extends java.lang.Object implements SnapshotStore
If a PersistentActor calls the Snapshotter.saveSnapshot(java.lang.Object) method,
and at the same time does not configure a specific snapshot-store to be used *and* no default snapshot-store
is available, then the NoSnapshotStore will be used to signal a snapshot store failure.
| Modifier and Type | Class and Description |
|---|---|
class |
NoSnapshotStore.NoSnapshotStoreException |
Actor.emptyBehavior$, Actor.ignoringBehavior$| Constructor and Description |
|---|
NoSnapshotStore() |
| Modifier and Type | Method and Description |
|---|---|
ActorContext |
context()
Stores the context for this actor, including self, and sender.
|
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> |
receiveSnapshotStore() |
scala.concurrent.Future<scala.runtime.BoxedUnit> |
saveAsync(SnapshotMetadata metadata,
java.lang.Object snapshot)
Plugin API: asynchronously saves a snapshot.
|
ActorRef |
self()
The 'self' field holds the ActorRef for this actor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreceive, receivePluginInternal, senderPersistentActor, tryReceivePluginInternalaroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, postRestart, postStop, preRestart, preStart, sender, supervisorStrategy, unhandledlogpublic final scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receiveSnapshotStore()
receiveSnapshotStore in interface SnapshotStorepublic ActorContext context()
Actorforward.
WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContext is the Scala API. getContext returns a
UntypedActorContext, which is the Java API of the actor
context.
public final ActorRef self()
Actorself ! message
public scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(java.lang.String persistenceId, SnapshotSelectionCriteria criteria)
SnapshotStore
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.
loadAsync in interface SnapshotStorepersistenceId - id of the persistent actor.criteria - selection criteria for loading.public scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata, java.lang.Object snapshot)
SnapshotStoreThis call is protected with a circuit-breaker.
saveAsync in interface SnapshotStoremetadata - snapshot metadata.snapshot - snapshot.public scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(SnapshotMetadata metadata)
SnapshotStoremetadata.
This call is protected with a circuit-breaker.
deleteAsync in interface SnapshotStoremetadata - snapshot metadata.public scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(java.lang.String persistenceId,
SnapshotSelectionCriteria criteria)
SnapshotStorecriteria.
This call is protected with a circuit-breaker.
deleteAsync in interface SnapshotStorepersistenceId - id of the persistent actor.criteria - selection criteria for deleting.