public class ClusterClockImpl extends Object implements ClusterClock
Constructor and Description |
---|
ClusterClockImpl(ILogger logger) |
Modifier and Type | Method and Description |
---|---|
long |
getClusterStartTime() |
long |
getClusterTime()
Returns the cluster-time in milliseconds.
|
long |
getClusterUpTime()
Returns the cluster up-time in milliseconds.
|
void |
setClusterStartTime(long startTime) |
void |
setMasterTime(long masterTime)
Calculate and set the cluster clock diff.
|
public ClusterClockImpl(ILogger logger)
public long getClusterTime()
ClusterClock
System.nanoTime()
.getClusterTime
in interface ClusterClock
public void setMasterTime(long masterTime)
masterTime
- the cluster clock timestamp sent by the master nodepublic long getClusterUpTime()
ClusterClock
getClusterUpTime
in interface ClusterClock
public void setClusterStartTime(long startTime)
public long getClusterStartTime()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.