public class HeartbeatThread extends DirectoryThread
HeartbeatMsg on a given protocol session at
regular intervals when there are no other replication messages being
published.
These heartbeat messages are sent by a replication server.
DirectoryThread.FactoryThread.State, Thread.UncaughtExceptionHandlerDIRECTORY_THREAD_GROUPMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
HeartbeatThread(String threadName,
Session session,
long heartbeatInterval)
Create a heartbeat thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
static void |
setHeartbeatsDisabled(boolean heartbeatsDisabled)
For testing purposes only to simulate loss of heartbeats.
|
void |
shutdown()
Call this method to stop the thread.
|
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, initiateShutdown, isShutdownInitiated, setAssociatedTask, startWork, stopWorkactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic HeartbeatThread(String threadName, Session session, long heartbeatInterval)
threadName - The name of the heartbeat thread.session - The session on which heartbeats are to be sent.heartbeatInterval - The desired interval between heartbeats in
milliseconds.public void shutdown()
public static void setHeartbeatsDisabled(boolean heartbeatsDisabled)
heartbeatsDisabled - Set true to prevent heartbeats from being sent.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.