SnapshotTestKit

org.apache.pekko.persistence.testkit.javadsl.SnapshotTestKit
See theSnapshotTestKit companion object

Class for testing persisted snapshots in persistent actors.

Attributes

Companion
object
Source
SnapshotTestKit.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(system: ActorSystem)

Attributes

Source
SnapshotTestKit.scala

Concrete methods

def clearAll(): Unit

Clear all data from storage.

Clear all data from storage.

Attributes

Source
SnapshotTestKit.scala
def clearByPersistenceId(persistenceId: String): Unit

Clear all data from storage for particular persistence id.

Clear all data from storage for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def expectNextPersisted[A](persistenceId: String, snapshot: A): A

Check that snapshot has been saved in the storage.

Check that snapshot has been saved in the storage.

Attributes

Source
SnapshotTestKit.scala
def expectNextPersisted[A](persistenceId: String, snapshot: A, max: Duration): A

Check for max time that snapshot has been saved in the storage.

Check for max time that snapshot has been saved in the storage.

Attributes

Source
SnapshotTestKit.scala
def expectNextPersistedClass[A](persistenceId: String, cla: Class[A]): A

Check that next persisted in storage for particular persistence id snapshot has expected type.

Check that next persisted in storage for particular persistence id snapshot has expected type.

Attributes

Source
SnapshotTestKit.scala
def expectNextPersistedClass[A](persistenceId: String, cla: Class[A], max: Duration): A

Check for max time that next persisted in storage for particular persistence id snapshot has expected type.

Check for max time that next persisted in storage for particular persistence id snapshot has expected type.

Attributes

Source
SnapshotTestKit.scala
def expectNothingPersisted(persistenceId: String): Unit

Check that nothing has been saved in the storage.

Check that nothing has been saved in the storage.

Attributes

Source
SnapshotTestKit.scala
def expectNothingPersisted(persistenceId: String, max: Duration): Unit

Check for max time that nothing has been saved in the storage.

Check for max time that nothing has been saved in the storage.

Attributes

Source
SnapshotTestKit.scala

Fail next delete from storage attempt with cause exception for any persistence id.

Fail next delete from storage attempt with cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next delete from storage attempt with default exception for any persistence id.

Fail next delete from storage attempt with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextDelete(persistenceId: String, cause: Throwable): Unit

Fail next delete from storage attempt with cause exception for particular persistence id.

Fail next delete from storage attempt with cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextDelete(persistenceId: String): Unit

Fail next delete from storage attempt with default exception for particular persistence id.

Fail next delete from storage attempt with default exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNDeletes(n: Int, cause: Throwable): Unit

Fail next n delete from storage attempts with cause exception for any persistence id.

Fail next n delete from storage attempts with cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next n delete from storage attempts with default exception for any persistence id.

Fail next n delete from storage attempts with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNDeletes(persistenceId: String, n: Int, cause: Throwable): Unit

Fail next n delete from storage attempts with cause exception for particular persistence id.

Fail next n delete from storage attempts with cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNDeletes(persistenceId: String, n: Int): Unit

Fail next n delete from storage attempts with default exception for particular persistence id.

Fail next n delete from storage attempts with default exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNOps(n: Int): Unit

Fail n following journal operations regardless of their type. Fails operations with default ExpectedFailure exception.

Fail n following journal operations regardless of their type. Fails operations with default ExpectedFailure exception.

Attributes

Source
SnapshotTestKit.scala
def failNextNOps(n: Int, cause: Throwable): Unit

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.

Attributes

Source
SnapshotTestKit.scala
def failNextNOpsCond(cond: BiFunction[String, SnapshotOperation, Boolean], n: Int): Unit

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with default ExpectedFailure exception.

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with default ExpectedFailure exception.

Attributes

Source
SnapshotTestKit.scala
def failNextNOpsCond(cond: BiFunction[String, SnapshotOperation, Boolean], n: Int, cause: Throwable): Unit

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.

Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.

Attributes

Source
SnapshotTestKit.scala
def failNextNPersisted(persistenceId: String, n: Int, cause: Throwable): Unit

Fail next n write operations with the cause exception for particular persistence id.

Fail next n write operations with the cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNPersisted(persistenceId: String, n: Int): Unit

Fail next n write operations for particular persistence id.

Fail next n write operations for particular persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next n write operations with the cause exception for any persistence id.

Fail next n write operations with the cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next n write operations with default exception for any persistence id.

Fail next n write operations with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNReads(n: Int, cause: Throwable): Unit

Fail next n read from storage (recovery) attempts with cause exception for any persistence id.

Fail next n read from storage (recovery) attempts with cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next n read from storage (recovery) attempts with default exception for any persistence id.

Fail next n read from storage (recovery) attempts with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNReads(persistenceId: String, n: Int, cause: Throwable): Unit

Fail next n read from storage (recovery) attempts with cause exception for particular persistence id.

Fail next n read from storage (recovery) attempts with cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextNReads(persistenceId: String, n: Int): Unit

Fail next n read from storage (recovery) attempts with default exception for particular persistence id.

Fail next n read from storage (recovery) attempts with default exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextPersisted(persistenceId: String, cause: Throwable): Unit

Fail next write operations with cause exception for particular persistence id.

Fail next write operations with cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextPersisted(persistenceId: String): Unit

Fail next write operations with default exception for particular persistence id.

Fail next write operations with default exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next write operations with cause exception for any persistence id.

Fail next write operations with cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next write operations with default exception for any persistence id.

Fail next write operations with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextRead(cause: Throwable): Unit

Fail next read from storage (recovery) attempt with cause exception for any persistence id.

Fail next read from storage (recovery) attempt with cause exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala

Fail next read from storage (recovery) attempt with default exception for any persistence id.

Fail next read from storage (recovery) attempt with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextRead(persistenceId: String, cause: Throwable): Unit

Fail next read from storage (recovery) attempt with cause exception for particular persistence id.

Fail next read from storage (recovery) attempt with cause exception for particular persistence id.

Attributes

Source
SnapshotTestKit.scala
def failNextRead(persistenceId: String): Unit

Fail next read from storage (recovery) attempt with default exception for any persistence id.

Fail next read from storage (recovery) attempt with default exception for any persistence id.

Attributes

Source
SnapshotTestKit.scala
def persistForRecovery(persistenceId: String, snapshots: List[Pair[SnapshotMeta, Any]]): Unit

Persist snapshots with metadata into storage in order.

Persist snapshots with metadata into storage in order.

Attributes

Source
SnapshotTestKit.scala
def persistedInStorage(persistenceId: String): List[Pair[SnapshotMeta, Any]]

Retrieve all snapshots and their metadata saved in storage by persistence id.

Retrieve all snapshots and their metadata saved in storage by persistence id.

Attributes

Source
SnapshotTestKit.scala
def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A]): List[A]

Receive next n snapshots that have been persisted in the storage.

Receive next n snapshots that have been persisted in the storage.

Attributes

Source
SnapshotTestKit.scala
def receivePersisted[A](persistenceId: String, n: Int, cla: Class[A], max: Duration): List[A]

Receive for max time next n snapshots that have been persisted in the storage.

Receive for max time next n snapshots that have been persisted in the storage.

Attributes

Source
SnapshotTestKit.scala
def resetPolicy(): Unit

Returns default policy if it was changed by withPolicy.

Returns default policy if it was changed by withPolicy.

Attributes

Source
SnapshotTestKit.scala
def withPolicy(policy: PolicyType): SnapshotTestKit

Set new processing policy for journal operations. NOTE! Overrides previously invoked failNext... or rejectNext...

Set new processing policy for journal operations. NOTE! Overrides previously invoked failNext... or rejectNext...

Attributes

Source
SnapshotTestKit.scala