class Persistence extends Extension
- Alphabetic
- By Inheritance
- Persistence
- Extension
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Persistence(system: ExtendedActorSystem)
Value Members
- final def adaptersFor(journalPluginId: String, journalPluginConfig: Config): EventAdapters
Returns an akka.persistence.journal.EventAdapters object which serves as a per-journal collection of bound event adapters.
Returns an akka.persistence.journal.EventAdapters object which serves as a per-journal collection of bound event adapters. If no adapters are registered for a given journal the EventAdapters object will simply return the identity adapter for each class, otherwise the most specific adapter matching a given class will be returned.
The provided journalPluginConfig will be used to configure the plugin instead of the actor system config.
- final def adaptersFor(journalPluginId: String): EventAdapters
Returns an akka.persistence.journal.EventAdapters object which serves as a per-journal collection of bound event adapters.
Returns an akka.persistence.journal.EventAdapters object which serves as a per-journal collection of bound event adapters. If no adapters are registered for a given journal the EventAdapters object will simply return the identity adapter for each class, otherwise the most specific adapter matching a given class will be returned.
- lazy val defaultInternalStashOverflowStrategy: StashOverflowStrategy
- final def getSliceRanges(numberOfRanges: Int): List[Pair[Integer, Integer]]
Java API: Split the total number of slices into ranges by the given
numberOfRanges
.Java API: Split the total number of slices into ranges by the given
numberOfRanges
.For example,
numberOfSlices
is 128 and given 4numberOfRanges
this method will return ranges (0 to 255), (256 to 511), (512 to 767) and (768 to 1023). - final def numberOfSlices: Int
A slice is deterministically defined based on the persistence id.
A slice is deterministically defined based on the persistence id.
numberOfSlices
is not configurable because changing the value would result in different slice for a persistence id than what was used before, which would result in invalid eventsBySlices.numberOfSlices
is 1024 - def persistenceId(persistentActor: ActorRef): String
Creates a canonical persistent actor id from a persistent actor ref.
- val settings: PersistenceSettings
- final def sliceForPersistenceId(persistenceId: String): Int
A slice is deterministically defined based on the persistence id.
A slice is deterministically defined based on the persistence id. The purpose is to evenly distribute all persistence ids over the slices and be able to query the events for a range of slices.
- final def sliceRanges(numberOfRanges: Int): IndexedSeq[Range]
Scala API: Split the total number of slices into ranges by the given
numberOfRanges
.Scala API: Split the total number of slices into ranges by the given
numberOfRanges
.For example,
numberOfSlices
is 1024 and given 4numberOfRanges
this method will return ranges (0 to 255), (256 to 511), (512 to 767) and (768 to 1023). - val system: ExtendedActorSystem