Package com.gigaspaces.lrmi.nio.watchdog
Class Watchdog.WatchdogGroup
java.lang.Object
com.gigaspaces.lrmi.nio.watchdog.Watchdog.WatchdogGroup
- Enclosing class:
- Watchdog
WatchdogGroup is a group of objects that are monitored by the Watchdog. Each WatchdogGroup
instance has its own configuration.
- Since:
- 5.1
- Version:
- 1.0
- Author:
- anna
-
Constructor Summary
ConstructorsConstructorDescriptionWatchdogGroup(String name, long timeout, int timeoutResolution, com.gigaspaces.lrmi.nio.watchdog.TimeoutObserver observer) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddIdleWatch(ConnectionResource client) Add CPeer to the watched objects (idle group)addRequestWatch(SocketChannel sock, ConnectionResource client) Add given socket to the watched objects (request group)addResponseWatch(SocketChannel sock, ConnectionResource client) Add given socket and cpeer to the watched objects (response group)protected voidfireTimeoutOccured(Map<Watchdog.WatchedObject, Collection<Watchdog.WatchedObject>> watchedObjects) Fire timeout event about the watched object to the TimeoutObserverlongvoidremoveWatch(Watchdog.WatchedObject watched) Remove given watched object from watch .
-
Constructor Details
-
WatchdogGroup
public WatchdogGroup(String name, long timeout, int timeoutResolution, com.gigaspaces.lrmi.nio.watchdog.TimeoutObserver observer) Constructor.- Parameters:
timeout- watchdog group timeout in millisecondstimeoutResolution- in percents
-
-
Method Details
-
fireTimeoutOccured
protected void fireTimeoutOccured(Map<Watchdog.WatchedObject, Collection<Watchdog.WatchedObject>> watchedObjects) throws ExceptionFire timeout event about the watched object to the TimeoutObserver- Throws:
Exception- See Also:
-
TimeoutObserverWatchdog.WatchedObject
-
addRequestWatch
Add given socket to the watched objects (request group)- Parameters:
sock- socket
-
addResponseWatch
Add given socket and cpeer to the watched objects (response group)- Parameters:
sock- socket
-
addIdleWatch
Add CPeer to the watched objects (idle group) -
removeWatch
Remove given watched object from watch . WatchedObject is set as not in use and later removed by the Watchdog. -
getTimeout
public long getTimeout()
-