Interface DurableStateUpdateStore<A>
- All Superinterfaces:
DurableStateStore<A>
- All Known Implementing Classes:
PersistenceTestKitDurableStateStore
API for updating durable state objects.
For Java API see pekko.persistence.state.javadsl.DurableStateUpdateStore.
-
Method Summary
Modifier and TypeMethodDescriptionscala.concurrent.Future<Done>deleteObject(String persistenceId) Deprecated.Use the deleteObject overload with revision instead.scala.concurrent.Future<Done>deleteObject(String persistenceId, long revision) Delete the object with the givenpersistenceIdandrevision.scala.concurrent.Future<Done>upsertObject(String persistenceId, long revision, A value, String tag) Upsert the object with the givenpersistenceIdandrevision.Methods inherited from interface org.apache.pekko.persistence.state.scaladsl.DurableStateStore
getObject
-
Method Details
-
deleteObject
Deprecated.Use the deleteObject overload with revision instead. Since Akka 2.6.20.Delete the object with the givenpersistenceId. This deprecated function ignores whether the object is deleted or not.- Parameters:
persistenceId- the persistenceId of the object to delete- Returns:
- a Future that completes when the object has been deleted
-
deleteObject
Delete the object with the givenpersistenceIdandrevision.If the revision does not match the expected revision of the object, the delete operation will fail. The returned Future will complete with a failed result wrapping the exception.
- Parameters:
persistenceId- the persistenceId of the object to deleterevision- the expected next revision for thepersistenceId— this must be one more than the current (existing) revision of the object- Returns:
- a Future that completes when the object has been deleted or fails if the revision does not match the expected revision of the object
-
upsertObject
scala.concurrent.Future<Done> upsertObject(String persistenceId, long revision, A value, String tag) Upsert the object with the givenpersistenceIdandrevision.- Parameters:
persistenceId- the persistenceId of the object to upsertrevision- the revision of the object to upsertvalue- the value to upserttag- a tag to associate with the object- Returns:
- a Future that completes when the object has been upserted
-