Package akka.persistence.typed.javadsl
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 boolean
concurrent()
Must only be called from the event handlerlong
currentTimeMillis()
java.lang.String
entityId()
java.util.Set<ReplicaId>
getAllReplicas()
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
-
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 unique id of this replica, not including the replica id
-
getAllReplicas
java.util.Set<ReplicaId> getAllReplicas()
- Returns:
- The ids of all replicas of this replicated event sourced actor
-
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()
-
-