public class CachedEpochClock extends java.lang.Object implements EpochClock
EpochClock
that caches a timestamp which can be updated with update(long)
.
Instances are threadsafe with the read being volatile.
Modifier and Type | Field and Description |
---|---|
protected long |
p1 |
protected long |
p10 |
protected long |
p11 |
protected long |
p12 |
protected long |
p13 |
protected long |
p14 |
protected long |
p15 |
protected long |
p2 |
protected long |
p3 |
protected long |
p4 |
protected long |
p5 |
protected long |
p6 |
protected long |
p7 |
protected long |
p8 |
protected long |
p9 |
protected long |
timeMs |
Constructor and Description |
---|
CachedEpochClock() |
Modifier and Type | Method and Description |
---|---|
long |
time()
Time in milliseconds since 1 Jan 1970 UTC.
|
void |
update(long timeMs)
Update the value of the timestamp in with ordered semantics.
|
void |
updateWeak(long timeMs)
Update the value of the timestamp in with weak ordering semantics.
|
protected long p1
protected long p2
protected long p3
protected long p4
protected long p5
protected long p6
protected long p7
protected long p8
protected long p9
protected long p10
protected long p11
protected long p12
protected long p13
protected long p14
protected long p15
protected volatile long timeMs
public long time()
EpochClock
time
in interface EpochClock
public void update(long timeMs)
timeMs
- value to update the timestamp.public void updateWeak(long timeMs)
timeMs
- value to update the timestamp.Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.