Package alluxio.heartbeat
Interface HeartbeatTimer
-
- All Superinterfaces:
Reconfigurable
- All Known Implementing Classes:
ScheduledTimer
,SleepingTimer
public interface HeartbeatTimer extends Reconfigurable
An interface for heartbeat timers. TheHeartbeatThread
calls thetick()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description long
tick()
Waits until next heartbeat should be executed.default void
update()
When this object needs to be reconfigured due to external configuration change etc., this function will be invoked.
-
-
-
Method Detail
-
update
default void update()
When this object needs to be reconfigured due to external configuration change etc., this function will be invoked.- Specified by:
update
in interfaceReconfigurable
-
tick
long tick() throws java.lang.InterruptedException
Waits until next heartbeat should be executed.- Returns:
- time limit in milliseconds for this heartbeat action to run for before the next heartbeat is due.
- Throws:
java.lang.InterruptedException
- if the thread is interrupted while waiting
-
-