Packages

class SnapshotTestKit extends AnyRef

Class for testing persisted snapshots in persistent actors.

Annotations
@ApiMayChange()
Source
SnapshotTestKit.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SnapshotTestKit
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SnapshotTestKit(system: ActorSystem)
  2. new SnapshotTestKit(scalaTestkit: scaladsl.SnapshotTestKit)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toany2stringadd[SnapshotTestKit] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SnapshotTestKit, B)
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toArrowAssoc[SnapshotTestKit] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clearAll(): Unit

    Clear all data from storage.

  8. def clearByPersistenceId(persistenceId: String): Unit

    Clear all data from storage for particular persistence id.

  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  10. def ensuring(cond: (SnapshotTestKit) => Boolean, msg: => Any): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toEnsuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: (SnapshotTestKit) => Boolean): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toEnsuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean, msg: => Any): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toEnsuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean): SnapshotTestKit
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toEnsuring[SnapshotTestKit] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def expectNextPersisted[A](persistenceId: String, snapshot: A, max: Duration): A

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

  17. def expectNextPersisted[A](persistenceId: String, snapshot: A): A

    Check that snapshot has been saved in the storage.

  18. 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.

  19. def expectNextPersistedClass[A](persistenceId: String, cla: Class[A]): A

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

  20. def expectNothingPersisted(persistenceId: String, max: Duration): Unit

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

  21. def expectNothingPersisted(persistenceId: String): Unit

    Check that nothing has been saved in the storage.

  22. def failNextDelete(persistenceId: String): Unit

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

  23. def failNextDelete(persistenceId: String, cause: Throwable): Unit

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

  24. def failNextDelete(): Unit

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

  25. def failNextDelete(cause: Throwable): Unit

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

  26. def failNextNDeletes(persistenceId: String, n: Int): Unit

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

  27. def failNextNDeletes(persistenceId: String, n: Int, cause: Throwable): Unit

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

  28. def failNextNDeletes(n: Int): Unit

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

  29. def failNextNDeletes(n: Int, cause: Throwable): Unit

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

  30. def failNextNOps(n: Int, cause: Throwable): Unit

    Fail n following journal operations depending on the condition cond.

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

  31. def failNextNOps(n: Int): Unit

    Fail n following journal operations regardless of their type.

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

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

    Fail n following journal operations depending on the condition cond.

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

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

    Fail n following journal operations depending on the condition cond.

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

  34. def failNextNPersisted(n: Int): Unit

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

  35. def failNextNPersisted(n: Int, cause: Throwable): Unit

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

  36. def failNextNPersisted(persistenceId: String, n: Int): Unit

    Fail next n write operations for particular persistence id.

  37. def failNextNPersisted(persistenceId: String, n: Int, cause: Throwable): Unit

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

  38. def failNextNReads(persistenceId: String, n: Int): Unit

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

  39. def failNextNReads(persistenceId: String, n: Int, cause: Throwable): Unit

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

  40. def failNextNReads(n: Int): Unit

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

  41. def failNextNReads(n: Int, cause: Throwable): Unit

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

  42. def failNextPersisted(): Unit

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

  43. def failNextPersisted(cause: Throwable): Unit

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

  44. def failNextPersisted(persistenceId: String): Unit

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

  45. def failNextPersisted(persistenceId: String, cause: Throwable): Unit

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

  46. def failNextRead(persistenceId: String): Unit

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

  47. def failNextRead(persistenceId: String, cause: Throwable): Unit

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

  48. def failNextRead(): Unit

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

  49. def failNextRead(cause: Throwable): Unit

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

  50. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  51. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  52. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  53. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  55. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  56. def persistForRecovery(persistenceId: String, snapshots: List[Pair[SnapshotMeta, Any]]): Unit

    Persist snapshots with metadata into storage in order.

  57. def persistedInStorage(persistenceId: String): List[Pair[SnapshotMeta, Any]]

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

  58. 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.

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

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

  60. def resetPolicy(): Unit

    Returns default policy if it was changed by SnapshotTestKit.withPolicy().

  61. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. def withPolicy(policy: SnapshotStorage.SnapshotPolicies.PolicyType): SnapshotTestKit

    Set new processing policy for journal operations.

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

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toStringFormat[SnapshotTestKit] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (SnapshotTestKit, B)
    Implicit
    This member is added by an implicit conversion from SnapshotTestKit toArrowAssoc[SnapshotTestKit] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromSnapshotTestKit to any2stringadd[SnapshotTestKit]

Inherited by implicit conversion StringFormat fromSnapshotTestKit to StringFormat[SnapshotTestKit]

Inherited by implicit conversion Ensuring fromSnapshotTestKit to Ensuring[SnapshotTestKit]

Inherited by implicit conversion ArrowAssoc fromSnapshotTestKit to ArrowAssoc[SnapshotTestKit]

Ungrouped