Interface DurableStateUpdateStore<A>

All Superinterfaces:
DurableStateStore<A>
All Known Implementing Classes:
PersistenceTestKitDurableStateStore

public interface DurableStateUpdateStore<A> extends DurableStateStore<A>
API for updating durable state objects.

For Scala API see pekko.persistence.state.scaladsl.DurableStateUpdateStore.

  • Method Details

    • deleteObject

      CompletionStage<Done> deleteObject(String persistenceId)
      Deprecated.
      Use the deleteObject overload with revision instead. Since Akka 2.6.20.
      Delete the object with the given persistenceId. This deprecated function ignores whether the object is deleted or not.

      Parameters:
      persistenceId - the persistenceId of the object to delete
      Returns:
      a CompletionStage that completes when the object has been deleted
    • deleteObject

      CompletionStage<Done> deleteObject(String persistenceId, long revision)
      Delete the object with the given persistenceId and revision.

      If the revision does not match the expected revision of the object, the delete operation will fail. The returned CompletionStage will complete with a failed result wrapping the exception.

      Parameters:
      persistenceId - the persistenceId of the object to delete
      revision - the expected next revision for the persistenceId — this must be one more than the current (existing) revision of the object
      Returns:
      a CompletionStage that completes when the object has been deleted or fails if the revision does not match the expected revision of the object
    • upsertObject

      CompletionStage<Done> upsertObject(String persistenceId, long revision, A value, String tag)
      Upsert the object with the given persistenceId and revision.

      Parameters:
      persistenceId - the persistenceId of the object to upsert
      revision - the revision of the object to upsert
      value - the value to upsert
      tag - a tag to associate with the object
      Returns:
      a CompletionStage that completes when the object has been upserted