Package akka.persistence.typed.internal
Class ReplicationContextImpl
- java.lang.Object
-
- akka.persistence.typed.internal.ReplicationContextImpl
-
- All Implemented Interfaces:
ReplicationContext
,ReplicationContext
public final class ReplicationContextImpl extends java.lang.Object implements ReplicationContext, ReplicationContext
INTERNAL API
-
-
Constructor Summary
Constructors Constructor Description ReplicationContextImpl(ReplicationId replicationId, scala.collection.immutable.Map<ReplicaId,java.lang.String> replicasAndQueryPlugins)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
_concurrent()
void
_concurrent_$eq(boolean x$1)
OptionVal<java.lang.Thread>
_currentThread()
void
_currentThread_$eq(OptionVal<java.lang.Thread> x$1)
OptionVal<ReplicaId>
_origin()
void
_origin_$eq(OptionVal<ReplicaId> x$1)
boolean
_recoveryRunning()
void
_recoveryRunning_$eq(boolean x$1)
scala.collection.immutable.Set<ReplicaId>
allReplicas()
boolean
concurrent()
Whether the happened concurrently with an event from another replica.long
currentTimeMillis()
java.util.Set<ReplicaId>
getAllReplicas()
ReplicaId
origin()
The origin of the current event.PersistenceId
persistenceId()
boolean
recoveryRunning()
Must only be called from the event handlerscala.collection.immutable.Map<ReplicaId,java.lang.String>
replicasAndQueryPlugins()
ReplicationId
replicationId()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.persistence.typed.javadsl.ReplicationContext
entityId, replicaId
-
Methods inherited from interface akka.persistence.typed.scaladsl.ReplicationContext
entityId, replicaId
-
-
-
-
Constructor Detail
-
ReplicationContextImpl
public ReplicationContextImpl(ReplicationId replicationId, scala.collection.immutable.Map<ReplicaId,java.lang.String> replicasAndQueryPlugins)
-
-
Method Detail
-
_concurrent
public boolean _concurrent()
-
_concurrent_$eq
public void _concurrent_$eq(boolean x$1)
-
_currentThread
public OptionVal<java.lang.Thread> _currentThread()
-
_currentThread_$eq
public void _currentThread_$eq(OptionVal<java.lang.Thread> x$1)
-
_recoveryRunning
public boolean _recoveryRunning()
-
_recoveryRunning_$eq
public void _recoveryRunning_$eq(boolean x$1)
-
allReplicas
public scala.collection.immutable.Set<ReplicaId> allReplicas()
- Specified by:
allReplicas
in interfaceReplicationContext
- Returns:
- The ids of all replicas of this replicated event sourced actor
-
concurrent
public boolean concurrent()
Whether the happened concurrently with an event from another replica. Undefined result if called from any where other than an event handler.- Specified by:
concurrent
in interfaceReplicationContext
- Specified by:
concurrent
in interfaceReplicationContext
- Returns:
- true if this event happened concurrent with an event from another replica
-
currentTimeMillis
public long currentTimeMillis()
- Specified by:
currentTimeMillis
in interfaceReplicationContext
- Specified by:
currentTimeMillis
in interfaceReplicationContext
- Returns:
- a timestamp that will always be increasing (is monotonic)
-
getAllReplicas
public java.util.Set<ReplicaId> getAllReplicas()
- Specified by:
getAllReplicas
in interfaceReplicationContext
- Returns:
- The ids of all replicas of this replicated event sourced actor
-
origin
public ReplicaId origin()
The origin of the current event. Undefined result if called from anywhere other than an event handler.- Specified by:
origin
in interfaceReplicationContext
- Specified by:
origin
in interfaceReplicationContext
- Returns:
- the replica id where the current event was persisted
-
persistenceId
public PersistenceId persistenceId()
- Specified by:
persistenceId
in interfaceReplicationContext
- Specified by:
persistenceId
in interfaceReplicationContext
- Returns:
- The unique id of this replica, including the replica id
-
recoveryRunning
public boolean recoveryRunning()
Description copied from interface:ReplicationContext
Must only be called from the event handler- Specified by:
recoveryRunning
in interfaceReplicationContext
- Specified by:
recoveryRunning
in interfaceReplicationContext
- Returns:
- true when the event handler is invoked during recovery.
-
replicasAndQueryPlugins
public scala.collection.immutable.Map<ReplicaId,java.lang.String> replicasAndQueryPlugins()
-
replicationId
public ReplicationId replicationId()
- Specified by:
replicationId
in interfaceReplicationContext
- Specified by:
replicationId
in interfaceReplicationContext
-
-