Package

akka

persistence

Permalink

package persistence

Content Hierarchy Learn more about scaladoc diagrams
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractPersistentActor extends AbstractActor with PersistentActor with Eventsourced

    Permalink

    Java API: an persistent actor - can be used to implement command or event sourcing.

  2. abstract class AbstractPersistentActorWithAtLeastOnceDelivery extends AbstractPersistentActor with AtLeastOnceDeliveryLike

    Permalink

    Java API compatible with lambda expressions

    Java API compatible with lambda expressions

    Use this class instead of UntypedPersistentActor to send messages with at-least-once delivery semantics to destinations. Full documentation in AtLeastOnceDelivery.

    See also

    AtLeastOnceDeliveryLike

    AtLeastOnceDelivery

  3. trait AtLeastOnceDelivery extends PersistentActor with AtLeastOnceDeliveryLike

    Permalink

    Mix-in this trait with your PersistentActor to send messages with at-least-once delivery semantics to destinations.

    Mix-in this trait with your PersistentActor to send messages with at-least-once delivery semantics to destinations. It takes care of re-sending messages when they have not been confirmed within a configurable timeout. Use the AtLeastOnceDeliveryLike#deliver method to send a message to a destination. Call the AtLeastOnceDeliveryLike#confirmDelivery method when the destination has replied with a confirmation message.

    At-least-once delivery implies that original message send order is not always retained and the destination may receive duplicate messages due to possible resends.

    The interval between redelivery attempts can be defined by AtLeastOnceDeliveryLike#redeliverInterval. After a number of delivery attempts a AtLeastOnceDelivery.UnconfirmedWarning message will be sent to self. The re-sending will still continue, but you can choose to call AtLeastOnceDeliveryLike#confirmDelivery to cancel the re-sending.

    The AtLeastOnceDelivery trait has a state consisting of unconfirmed messages and a sequence number. It does not store this state itself. You must persist events corresponding to the deliver and confirmDelivery invocations from your PersistentActor so that the state can be restored by calling the same methods during the recovery phase of the PersistentActor. Sometimes these events can be derived from other business level events, and sometimes you must create separate events. During recovery calls to deliver will not send out the message, but it will be sent later if no matching confirmDelivery was performed.

    Support for snapshots is provided by AtLeastOnceDeliveryLike#getDeliverySnapshot and AtLeastOnceDeliveryLike#setDeliverySnapshot. The AtLeastOnceDeliverySnapshot contains the full delivery state, including unconfirmed messages. If you need a custom snapshot for other parts of the actor state you must also include the AtLeastOnceDeliverySnapshot. It is serialized using protobuf with the ordinary Akka serialization mechanism. It is easiest to include the bytes of the AtLeastOnceDeliverySnapshot as a blob in your custom snapshot.

    See also

    AtLeastOnceDeliveryLike

  4. trait AtLeastOnceDeliveryLike extends Eventsourced

    Permalink

  5. final case class AtomicWrite(payload: Seq[PersistentRepr]) extends PersistentEnvelope with Message with Product with Serializable

    Permalink
  6. class BaselineActor extends Actor

    Permalink

    only as a "the best we could possibly get" baseline, does not persist anything

  7. case class Confirm(deliveryId: Long) extends Product with Serializable

    Permalink
  8. final case class DeleteMessagesFailure(cause: Throwable, toSequenceNr: Long) extends Product with Serializable

    Permalink

    Reply message to a failed Eventsourced#deleteMessages request.

  9. final case class DeleteMessagesSuccess(toSequenceNr: Long) extends Product with Serializable

    Permalink

    Reply message to a successful Eventsourced#deleteMessages request.

  10. final case class DeleteSnapshotFailure(metadata: SnapshotMetadata, cause: Throwable) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after failed deletion of a snapshot.

    Sent to a PersistentActor after failed deletion of a snapshot.

    metadata

    snapshot metadata.

    cause

    failure cause.

    Annotations
    @SerialVersionUID()
  11. final case class DeleteSnapshotSuccess(metadata: SnapshotMetadata) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after successful deletion of a snapshot.

    Sent to a PersistentActor after successful deletion of a snapshot.

    metadata

    snapshot metadata.

    Annotations
    @SerialVersionUID()
  12. final case class DeleteSnapshotsFailure(criteria: SnapshotSelectionCriteria, cause: Throwable) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after failed deletion of a range of snapshots.

    Sent to a PersistentActor after failed deletion of a range of snapshots.

    criteria

    snapshot selection criteria.

    cause

    failure cause.

    Annotations
    @SerialVersionUID()
  13. final case class DeleteSnapshotsSuccess(criteria: SnapshotSelectionCriteria) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after successful deletion of specified range of snapshots.

    Sent to a PersistentActor after successful deletion of specified range of snapshots.

    criteria

    snapshot selection criteria.

    Annotations
    @SerialVersionUID()
  14. class DestinationActor extends Actor

    Permalink
  15. sealed trait Event extends AnyRef

    Permalink
  16. final case class Evt(i: Int) extends Product with Serializable

    Permalink
  17. class LevelDbBatchingBenchmark extends AnyRef

    Permalink
    Annotations
    @Fork() @Threads() @State() @BenchmarkMode()
  18. case class Msg(deliveryId: Long, n: Int) extends Product with Serializable

    Permalink
  19. case class MsgConfirmed(deliveryId: Long) extends Event with Product with Serializable

    Permalink
  20. case class MsgSent(n: Int) extends Event with Product with Serializable

    Permalink
  21. class NoPersistPersistentActor extends PersistentActor

    Permalink
  22. class NoPersistPersistentActorWithAtLeastOnceDelivery extends PersistentActor with AtLeastOnceDelivery

    Permalink
  23. class PersistAsyncPersistentActor extends PersistentActor

    Permalink
  24. class PersistAsyncPersistentActorWithAtLeastOnceDelivery extends PersistentActor with AtLeastOnceDelivery

    Permalink
  25. class PersistAsyncQuickReplyPersistentActor extends PersistentActor

    Permalink
  26. class PersistPersistentActor extends PersistentActor

    Permalink
  27. class PersistPersistentActorWithAtLeastOnceDelivery extends PersistentActor with AtLeastOnceDelivery

    Permalink
  28. class Persistence extends Extension

    Permalink

    Persistence extension.

  29. trait PersistenceIdentity extends AnyRef

    Permalink

    Identification of PersistentActor or PersistentView.

  30. trait PersistenceRecovery extends AnyRef

    Permalink
  31. final class PersistenceSettings extends AnyRef

    Permalink

    Persistence configuration.

  32. trait PersistentActor extends Eventsourced with PersistenceIdentity

    Permalink

    An persistent Actor - can be used to implement command or event sourcing.

  33. class PersistentActorDeferBenchmark extends AnyRef

    Permalink
    Annotations
    @State() @BenchmarkMode()
  34. class PersistentActorThroughputBenchmark extends AnyRef

    Permalink
    Annotations
    @State() @BenchmarkMode()
  35. class PersistentActorWithAtLeastOnceDeliveryBenchmark extends AnyRef

    Permalink
    Annotations
    @State() @BenchmarkMode()
  36. trait PersistentRepr extends Message

    Permalink

    Plugin API: representation of a persistent message in the journal plugin API.

    Plugin API: representation of a persistent message in the journal plugin API.

    See also

    akka.persistence.journal.AsyncRecovery

    akka.persistence.journal.AsyncWriteJournal

  37. abstract class PluginSpec extends TestKitBase with WordSpecLike with Matchers with BeforeAndAfterAll with BeforeAndAfterEach

    Permalink
  38. final case class Recovery(fromSnapshot: SnapshotSelectionCriteria = SnapshotSelectionCriteria.Latest, toSequenceNr: Long = Long.MaxValue, replayMax: Long = Long.MaxValue) extends Product with Serializable

    Permalink

    Recovery mode configuration object to be returned in PersistentActor#recovery.

    Recovery mode configuration object to be returned in PersistentActor#recovery.

    By default recovers from latest snapshot replays through to the last available event (last sequenceId).

    Recovery will start from a snapshot if the persistent actor has previously saved one or more snapshots and at least one of these snapshots matches the specified fromSnapshot criteria. Otherwise, recovery will start from scratch by replaying all stored events.

    If recovery starts from a snapshot, the persistent actor is offered that snapshot with a SnapshotOffer message, followed by replayed messages, if any, that are younger than the snapshot, up to the specified upper sequence number bound (toSequenceNr).

    fromSnapshot

    criteria for selecting a saved snapshot from which recovery should start. Default is latest (= youngest) snapshot.

    toSequenceNr

    upper sequence number bound (inclusive) for recovery. Default is no upper bound.

    replayMax

    maximum number of messages to replay. Default is no limit.

    Annotations
    @SerialVersionUID()
  39. abstract class RecoveryCompleted extends AnyRef

    Permalink
  40. final case class SaveSnapshotFailure(metadata: SnapshotMetadata, cause: Throwable) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after failed saving of a snapshot.

    Sent to a PersistentActor after failed saving of a snapshot.

    metadata

    snapshot metadata.

    cause

    failure cause.

    Annotations
    @SerialVersionUID()
  41. final case class SaveSnapshotSuccess(metadata: SnapshotMetadata) extends Response with Product with Serializable

    Permalink

    Sent to a PersistentActor after successful saving of a snapshot.

    Sent to a PersistentActor after successful saving of a snapshot.

    metadata

    snapshot metadata.

    Annotations
    @SerialVersionUID()
  42. final case class SelectedSnapshot(metadata: SnapshotMetadata, snapshot: Any) extends Product with Serializable

    Permalink

    Plugin API: a selected snapshot matching SnapshotSelectionCriteria.

    Plugin API: a selected snapshot matching SnapshotSelectionCriteria.

    metadata

    snapshot metadata.

    snapshot

    snapshot.

  43. final case class SnapshotMetadata(persistenceId: String, sequenceNr: Long, timestamp: Long = 0L) extends Product with Serializable

    Permalink

    Snapshot metadata.

    Snapshot metadata.

    persistenceId

    id of persistent actor from which the snapshot was taken.

    sequenceNr

    sequence number at which the snapshot was taken.

    timestamp

    time at which the snapshot was saved, defaults to 0 when unknown.

    Annotations
    @SerialVersionUID()
  44. final case class SnapshotOffer(metadata: SnapshotMetadata, snapshot: Any) extends Product with Serializable

    Permalink

    Offers a PersistentActor a previously saved snapshot during recovery.

    Offers a PersistentActor a previously saved snapshot during recovery. This offer is received before any further replayed messages.

    Annotations
    @SerialVersionUID()
  45. final case class SnapshotSelectionCriteria(maxSequenceNr: Long = Long.MaxValue, maxTimestamp: Long = Long.MaxValue, minSequenceNr: Long = 0L, minTimestamp: Long = 0L) extends Product with Serializable

    Permalink

    Selection criteria for loading and deleting snapshots.

    Selection criteria for loading and deleting snapshots.

    maxSequenceNr

    upper bound for a selected snapshot's sequence number. Default is no upper bound, i.e. Long.MaxValue

    maxTimestamp

    upper bound for a selected snapshot's timestamp. Default is no upper bound, i.e. Long.MaxValue

    minSequenceNr

    lower bound for a selected snapshot's sequence number. Default is no lower bound, i.e. 0L

    minTimestamp

    lower bound for a selected snapshot's timestamp. Default is no lower bound, i.e. 0L

    Annotations
    @SerialVersionUID()
    See also

    Recovery

  46. trait Snapshotter extends Actor

    Permalink

    Snapshot API on top of the internal snapshot protocol.

  47. abstract class UntypedPersistentActor extends UntypedActor with Eventsourced with PersistenceIdentity

    Permalink

    Java API: an persistent actor - can be used to implement command or event sourcing.

  48. abstract class UntypedPersistentActorWithAtLeastOnceDelivery extends UntypedPersistentActor with AtLeastOnceDeliveryLike

    Permalink

    Java API: Use this class instead of UntypedPersistentActor to send messages with at-least-once delivery semantics to destinations.

    Java API: Use this class instead of UntypedPersistentActor to send messages with at-least-once delivery semantics to destinations. Full documentation in AtLeastOnceDelivery.

    See also

    AtLeastOnceDeliveryLike

    AtLeastOnceDelivery

  49. final case class Update(await: Boolean = false, replayMax: Long = Long.MaxValue) extends Product with Serializable

    Permalink

    Instructs a PersistentView to update itself.

    Instructs a PersistentView to update itself. This will run a single incremental message replay with all messages from the corresponding persistent id's journal that have not yet been consumed by the view. To update a view with messages that have been written after handling this request, another Update request must be sent to the view.

    await

    if true, processing of further messages sent to the view will be delayed until the incremental message replay, triggered by this update request, completes. If false, any message sent to the view may interleave with replayed persistent event stream.

    replayMax

    maximum number of messages to replay when handling this update request. Defaults to Long.MaxValue (i.e. no limit).

    Annotations
    @SerialVersionUID()
  50. class persistAsync, defer extends PersistentActor

    Permalink
  51. class persistAsync, defer, respond ASAP extends PersistentActor

    Permalink
  52. abstract class AbstractPersistentView extends AbstractActor with PersistentView

    Permalink

    Java API: compatible with lambda expressions (to be used with akka.japi.pf.ReceiveBuilder)

    Java API: compatible with lambda expressions (to be used with akka.japi.pf.ReceiveBuilder)

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use Persistence Query instead

    See also

    PersistentView

  53. trait PersistentView extends Actor with Snapshotter with Stash with StashFactory with PersistenceIdentity with PersistenceRecovery with ActorLogging

    Permalink

    A view replicates the persistent message stream of a PersistentActor.

    A view replicates the persistent message stream of a PersistentActor. Implementation classes receive the message stream directly from the Journal. These messages can be processed to update internal state in order to maintain an (eventual consistent) view of the state of the corresponding persistent actor. A persistent view can also run on a different node, provided that a replicated journal is used.

    Implementation classes refer to a persistent actors' message stream by implementing persistenceId with the corresponding (shared) identifier value.

    Views can also store snapshots of internal state by calling autoUpdate. The snapshots of a view are independent of those of the referenced persistent actor. During recovery, a saved snapshot is offered to the view with a SnapshotOffer message, followed by replayed messages, if any, that are younger than the snapshot. Default is to offer the latest saved snapshot.

    By default, a view automatically updates itself with an interval returned by autoUpdateInterval. This method can be overridden by implementation classes to define a view instance-specific update interval. The default update interval for all views of an actor system can be configured with the akka.persistence.view.auto-update-interval configuration key. Applications may trigger additional view updates by sending the view Update requests. See also methods

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use Persistence Query instead

  54. abstract class UntypedPersistentView extends UntypedActor with PersistentView

    Permalink

    Java API.

    Java API.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use Persistence Query instead

    See also

    PersistentView

Value Members

  1. object AtLeastOnceDelivery

    Permalink
  2. object AtomicWrite extends Serializable

    Permalink
  3. object Persistence extends ExtensionId[Persistence] with ExtensionIdProvider

    Permalink

    Persistence extension provider.

  4. object PersistentRepr extends Serializable

    Permalink
  5. object Recovery extends Serializable

    Permalink
  6. object RecoveryCompleted extends RecoveryCompleted with Product with Serializable

    Permalink

    Sent to a PersistentActor when the journal replay has been finished.

    Sent to a PersistentActor when the journal replay has been finished.

    Annotations
    @SerialVersionUID()
  7. object SelectedSnapshot extends Serializable

    Permalink
  8. object SnapshotMetadata extends Serializable

    Permalink
  9. object SnapshotSelectionCriteria extends Serializable

    Permalink
  10. object Update extends Serializable

    Permalink
  11. package fsm

    Permalink
  12. package japi

    Permalink
  13. package journal

    Permalink
  14. package query

    Permalink
  15. package serialization

    Permalink
  16. package snapshot

    Permalink

Ungrouped