public class WatchDog
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList |
listEntries
list
|
protected LockSupport |
lock
lock protects list
|
| Modifier and Type | Method and Description |
|---|---|
static WatchDog |
getInstance() |
void |
register(TimedEntry timedEntry,
long timeUntilTimeout)
Registers timed object to observe.
|
void |
run()
Starts thread to remove timed out message requests.
|
void |
stop()
Stops thread, which handles timed entries.
|
void |
unregister(TimedEntry timedEntry)
Disables timed entry from managed objects of watchdog.
|
void |
update(TimedEntry timedEntry,
long timeUntilTimeout)
Updates timed entry with new time until timeout within managed objects of watchdog.
|
protected final LinkedList listEntries
protected LockSupport lock
public static WatchDog getInstance()
public void register(TimedEntry timedEntry, long timeUntilTimeout)
timedEntry - timeUntilTimeout - public void unregister(TimedEntry timedEntry)
timedEntry - public void update(TimedEntry timedEntry, long timeUntilTimeout)
timedEntry - timeUntilTimeout - public void run()
run in interface java.lang.Runnablepublic void stop()