public final class ReplicatedEventContext extends java.lang.Object implements EventContext
param: originDc the event was persisted by this data center
param: timestamp time when the event was persisted as returned by InternalReplicatedEntity.currentTimeMillis() or
InternalReplicatedEntity.currentTimeMillis(),
which is typically in epoch milliseconds, i.e. milliseconds since midnight, January 1, 1970 UTC.
param: sequenceNr the sequence number of the event
param: recoveryRunning true when the event is applied from replay when recovering the state at startup,
false if it was persisted now
param: concurrent The event was persisted with causal order (concurrent=false) to the previous event here,
or an update occurred in both data centers before the events had been replicated to the other side
(concurrent=true).
| Constructor and Description |
|---|
ReplicatedEventContext(java.lang.String originDc,
long timestamp,
long sequenceNr,
boolean recoveryRunning,
boolean concurrent) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
concurrent() |
java.lang.String |
originDc() |
boolean |
recoveryRunning()
true when the event is applied from replay when recovering the state at startup,
false if it was persisted now |
long |
sequenceNr()
The sequence number of the event.
|
long |
timestamp()
Time when the event was persisted as returned by
InternalReplicatedEntity.currentTimeMillis() or
InternalReplicatedEntity.currentTimeMillis(), which is typically in epoch milliseconds,
i.e. |
java.lang.String |
toString() |
public ReplicatedEventContext(java.lang.String originDc,
long timestamp,
long sequenceNr,
boolean recoveryRunning,
boolean concurrent)
public boolean concurrent()
public java.lang.String originDc()
public boolean recoveryRunning()
EventContexttrue when the event is applied from replay when recovering the state at startup,
false if it was persisted nowrecoveryRunning in interface EventContextpublic long sequenceNr()
EventContextsequenceNr in interface EventContextpublic long timestamp()
EventContextInternalReplicatedEntity.currentTimeMillis() or
InternalReplicatedEntity.currentTimeMillis(), which is typically in epoch milliseconds,
i.e. milliseconds since midnight, January 1, 1970 UTC.timestamp in interface EventContextpublic java.lang.String toString()
toString in class java.lang.Object