Timestamper.UpdateListener
public class RouterClock extends Clock
修飾子とタイプ | クラス | 説明 |
---|---|---|
static interface |
RouterClock.ClockShiftListener |
Clock.ClockUpdateListener
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
DEFAULT_STRATUM |
_alreadyChanged, _context, _isSystemClockBad, _offset, _startedOn, _statCreated, MAX_LIVE_OFFSET, MAX_OFFSET, MIN_OFFSET_CHANGE
コンストラクタ | 説明 |
---|---|
RouterClock(RouterContext context) |
Does not start.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
addShiftListener(RouterClock.ClockShiftListener lsnr) |
|
long |
getDeltaOffset() |
推奨されていません。
|
Timestamper |
getTimestamper() |
The RouterTimestamper
|
long |
now() |
Retrieve the current time synchronized with whatever reference clock is in use.
|
void |
removeShiftListener(RouterClock.ClockShiftListener lsnr) |
|
void |
setNow(long realTime,
int stratum) |
Warning - overridden in RouterClock
|
void |
setOffset(long offsetMs,
boolean force) |
Specify how far away from the "correct" time the computer is - a positive
value means that the system time is slow, while a negative value means the system time is fast.
|
void |
start() |
Cannot be stopped, but RouterTimestamper registers a shutdown task.
|
addUpdateListener, fireOffsetChanged, getInstance, getLog, getOffset, getUpdatedSuccessfully, removeUpdateListener, setNow, setOffset
public static final int DEFAULT_STRATUM
public RouterClock(RouterContext context)
public void start()
public Timestamper getTimestamper()
getTimestamper
クラス内 Clock
public void setOffset(long offsetMs, boolean force)
public void setNow(long realTime, int stratum)
Clock
setNow
インタフェース内 Timestamper.UpdateListener
setNow
クラス内 Clock
stratum
- used to determine whether we should ignorepublic long now()
public void addShiftListener(RouterClock.ClockShiftListener lsnr)
public void removeShiftListener(RouterClock.ClockShiftListener lsnr)
@Deprecated public long getDeltaOffset()