Interface SnapshotStore

All Superinterfaces:
Actor, ActorLogging
All Known Implementing Classes:
NoSnapshotStore, PersistenceTestKitSnapshotPlugin, SnapshotStore

public interface SnapshotStore extends Actor, ActorLogging
Abstract snapshot store.
  • Method Details

    • deleteAsync

      scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(SnapshotMetadata metadata)
      Plugin API: deletes the snapshot identified by metadata.

      This call is protected with a circuit-breaker.

      Parameters:
      metadata - snapshot metadata.
    • deleteAsync

      scala.concurrent.Future<scala.runtime.BoxedUnit> deleteAsync(String persistenceId, SnapshotSelectionCriteria criteria)
      Plugin API: deletes all snapshots matching criteria.

      This call is protected with a circuit-breaker.

      Parameters:
      persistenceId - id of the persistent actor.
      criteria - selection criteria for deleting.
    • loadAsync

      scala.concurrent.Future<scala.Option<SelectedSnapshot>> loadAsync(String persistenceId, SnapshotSelectionCriteria criteria)
      Plugin API: asynchronously loads a snapshot.

      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.

      Parameters:
      persistenceId - id of the persistent actor.
      criteria - selection criteria for loading.
    • org$apache$pekko$persistence$snapshot$SnapshotStore$_setter_$receiveSnapshotStore_$eq

      void org$apache$pekko$persistence$snapshot$SnapshotStore$_setter_$receiveSnapshotStore_$eq(scala.PartialFunction<Object,scala.runtime.BoxedUnit> x$1)
    • receive

      scala.PartialFunction<Object,scala.runtime.BoxedUnit> receive()
      Description copied from interface: Actor
      Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
      Specified by:
      receive in interface Actor
    • receivePluginInternal

      scala.PartialFunction<Object,scala.runtime.BoxedUnit> receivePluginInternal()
      Plugin API Allows plugin implementers to use f pipeTo self and handle additional messages for implementing advanced features
    • receiveSnapshotStore

      scala.PartialFunction<Object,scala.runtime.BoxedUnit> receiveSnapshotStore()
    • saveAsync

      scala.concurrent.Future<scala.runtime.BoxedUnit> saveAsync(SnapshotMetadata metadata, Object snapshot)
      Plugin API: asynchronously saves a snapshot.

      This call is protected with a circuit-breaker.

      Parameters:
      metadata - snapshot metadata.
      snapshot - snapshot.
    • senderPersistentActor

      ActorRef senderPersistentActor()
      Documents intent that the sender() is expected to be the PersistentActor
    • tryReceivePluginInternal

      void tryReceivePluginInternal(Object evt)