public final class ScheduledTimer extends Object implements HeartbeatTimer
| Constructor and Description |
|---|
ScheduledTimer(String threadName,
long intervalMs)
Creates a new instance of
ScheduledTimer. |
| Modifier and Type | Method and Description |
|---|---|
String |
getThreadName() |
void |
schedule()
Schedules execution of the heartbeat.
|
void |
tick()
Waits until the heartbeat is scheduled for execution.
|
public ScheduledTimer(String threadName, long intervalMs)
ScheduledTimer.threadName - the thread nameintervalMs - the heartbeat interval (unused)public String getThreadName()
public void schedule()
public void tick()
throws InterruptedException
tick in interface HeartbeatTimerInterruptedException - if the thread is interrupted while waitingCopyright © 2015. All Rights Reserved.