First implementation of DurableStateBehavior, #30277
* implementation is based on a copy of the EventSourcedBehavior and then refactoring all things that are not needed or different such as: * remove replicated event sourcing * remove ReplayingEvents recovery phase * remove retention and snapshotting * remove SnapshotSelectionCriteria and snapshots * remove PersistAll * remove event handler, event types * rename EventSourced * single static tag * DurableStateAdapter * DurableStateSignal * DurableStateStore plugin api with similar extension mechanism as query plugins * DurableStateStore, DurableStateUpdateStore * DurableStateStoreQuery * note that the DurableStateStore can be pretty useful for other things also
This commit is contained in:
parent
e43f2be6cd
commit
2168cec497
31 changed files with 3400 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (C) 2021 Lightbend Inc. <https://www.lightbend.com>
|
||||
*/
|
||||
|
||||
package akka.persistence.query
|
||||
|
||||
/**
|
||||
* @param persistenceId The persistence id of the origin entity.
|
||||
* @param seqNr The sequence number from the origin entity.
|
||||
* @param value The object value.
|
||||
* @param offset The offset that can be used in next `changes` or `currentChanges` query.
|
||||
* @param timestamp The time the state was stored, in milliseconds since midnight, January 1, 1970 UTC
|
||||
* (same as `System.currentTimeMillis`).
|
||||
*
|
||||
* @tparam A the type of the value
|
||||
*/
|
||||
final class DurableStateChange[A](
|
||||
val persistenceId: String,
|
||||
val seqNr: Long,
|
||||
val value: A,
|
||||
val offset: Offset,
|
||||
val timestamp: Long)
|
||||
Loading…
Add table
Add a link
Reference in a new issue