@NotThreadSafe public final class HeartbeatThread extends Object implements Runnable
Constructor and Description |
---|
HeartbeatThread(String threadName,
HeartbeatExecutor executor,
long intervalMs)
Creates a
Runnable to execute heartbeats for the given HeartbeatExecutor . |
public HeartbeatThread(String threadName, HeartbeatExecutor executor, long intervalMs)
Runnable
to execute heartbeats for the given HeartbeatExecutor
.
This class is responsible for closing the given HeartbeatExecutor
when it finishes.threadName
- identifies the heartbeat thread nameexecutor
- identifies the heartbeat thread executor; an instance of a class that
implements the HeartbeatExecutor interfaceintervalMs
- Sleep time between different heartbeatCopyright © 2023. All Rights Reserved.