Package akka.persistence.typed.scaladsl
Interface ReplicationContext
-
public interface ReplicationContext
Provides access to replication specific stateNot for user extension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.collection.immutable.Set<ReplicaId>
allReplicas()
boolean
concurrent()
Must only be called from the event handlerlong
currentTimeMillis()
java.lang.String
entityId()
ReplicaId
origin()
Must only be called from the event handlerPersistenceId
persistenceId()
boolean
recoveryRunning()
Must only be called from the event handlerReplicaId
replicaId()
ReplicationId
replicationId()
-
-
-
Method Detail
-
allReplicas
scala.collection.immutable.Set<ReplicaId> allReplicas()
- Returns:
- The ids of all replicas of this replicated event sourced actor
-
concurrent
boolean concurrent()
Must only be called from the event handler- Returns:
- true if this event happened concurrent with an event from another replica
-
currentTimeMillis
long currentTimeMillis()
- Returns:
- a timestamp that will always be increasing (is monotonic)
-
entityId
java.lang.String entityId()
- Returns:
- The entity id of this replicated event sourced actor (not including the replica id)
-
origin
ReplicaId origin()
Must only be called from the event handler- Returns:
- the replica id where the current event was persisted
-
persistenceId
PersistenceId persistenceId()
- Returns:
- The unique id of this replica, including the replica id
-
recoveryRunning
boolean recoveryRunning()
Must only be called from the event handler- Returns:
- true when the event handler is invoked during recovery.
-
replicaId
ReplicaId replicaId()
- Returns:
- The replica id of this replicated event sourced actor
-
replicationId
ReplicationId replicationId()
-
-