public class PingerThread extends Thread
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
PingerThread(int sleepSec)
Create a new instance of this thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(ReplicationConsumer consumer)
Add a new consumer to ping
|
void |
removeConsumer(ReplicationConsumer consumer)
Remove a consumer to ping
|
void |
run()
Starts the thread
|
void |
stopPinging()
Stops the ping for all the consumers
|
activeCount, 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 PingerThread(int sleepSec)
sleepSec - the number of seconds pinger thread should sleep before pinging the providerspublic void run()
public void addConsumer(ReplicationConsumer consumer)
consumer - The consumer we want to pingpublic void removeConsumer(ReplicationConsumer consumer)
consumer - The consumer we want to removepublic void stopPinging()
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.