final class EventSourcedCleanup extends AnyRef
Scala API: Tool for deleting all events and/or snapshots for a given list of persistenceIds
without using
persistent actors. It's important that the actors with corresponding persistenceId
are not running at the same time
as using the tool.
If resetSequenceNumber
is true
then the creating entity with the same persistenceId
will start from 0.
Otherwise it will continue from the latest highest used sequence number.
WARNING: reusing the same persistenceId
after resetting the sequence number should be avoided, since it might be
confusing to reuse the same sequence number for new events.
When a list of persistenceIds
are given they are deleted sequentially in the order of the list. It's possible to
parallelize the deletes by running several cleanup operations at the same time operating on different sets of
persistenceIds
.
- Annotations
- @ApiMayChange()
- Alphabetic
- By Inheritance
- EventSourcedCleanup
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cleanupBeforeSnapshot(persistenceIds: Seq[String]): Future[Done]
See single persistenceId overload for what is done for each persistence id
- def cleanupBeforeSnapshot(persistenceId: String): Future[Done]
Deletes all events for the given persistence id from before the snapshot.
Deletes all events for the given persistence id from before the snapshot. The snapshot is not deleted. The event with the same sequence number as the remaining snapshot is deleted.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def deleteAll(persistenceIds: Seq[String], resetSequenceNumber: Boolean): Future[Done]
Delete everything related to the given list of
persistenceIds
.Delete everything related to the given list of
persistenceIds
. All events and snapshots are deleted. - def deleteAll(persistenceId: String, resetSequenceNumber: Boolean): Future[Done]
Delete everything related to one single
persistenceId
.Delete everything related to one single
persistenceId
. All events and snapshots are deleted. - def deleteAllEvents(persistenceIds: Seq[String], resetSequenceNumber: Boolean): Future[Done]
Delete all events related to the given list of
persistenceIds
.Delete all events related to the given list of
persistenceIds
. Snapshots are not deleted. - def deleteAllEvents(persistenceId: String, resetSequenceNumber: Boolean): Future[Done]
Delete all events related to one single
persistenceId
.Delete all events related to one single
persistenceId
. Snapshots are not deleted. - def deleteEventsTo(persistenceId: String, toSequenceNr: Long): Future[Done]
Delete all events before a sequenceNr for the given persistence id.
Delete all events before a sequenceNr for the given persistence id. Snapshots are not deleted.
- persistenceId
the persistence id to delete for
- toSequenceNr
sequence nr (inclusive) to delete up to
- def deleteSnapshot(persistenceId: String): Future[Done]
Delete snapshots related to one single
persistenceId
.Delete snapshots related to one single
persistenceId
. Events are not deleted. - def deleteSnapshots(persistenceIds: Seq[String]): Future[Done]
Delete all snapshots related to the given list of
persistenceIds
.Delete all snapshots related to the given list of
persistenceIds
. Events are not deleted. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated