Interface ReplicationContext
-
public interface ReplicationContextProvides 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()booleanconcurrent()Must only be called from the event handlerlongcurrentTimeMillis()java.lang.StringentityId()ReplicaIdorigin()Must only be called from the event handlerPersistenceIdpersistenceId()booleanrecoveryRunning()Must only be called from the event handlerReplicaIdreplicaId()ReplicationIdreplicationId()
-
-
-
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()
-
-