Please post interface as part of this proposal.
I assume these are the interfaces. Please correct if this is not true.
/**
* This interface represents an abstract watchdog process that serves to
* monitor a situation and triggers an action under an
implementation-specific
* trigger condition.
*
* @author Andrei Ivanov
* @author Peter M. Goldstein <[EMAIL PROTECTED]>
*/
public interface Watchdog {
/**
* Start this Watchdog, causing it to begin monitoring. The Watchdog
can
* be stopped and restarted.
*/
void startWatchdog();
/**
* Reset this Watchdog. Resets any conditions in the implementations
* (time to expiration, etc.) to their original values
*/
void resetWatchdog();
/**
* Stop this Watchdog, terminating the monitoring condition. The
monitor
* can be restarted with a call to startWatchdog.
*/
void stopWatchdog();
}
/**
* This interface represents an action to be triggered by a watchdog
process.
*
* @author Andrei Ivanov
* @author Peter M. Goldstein <[EMAIL PROTECTED]>
*/
public interface WatchdogTarget {
/**
* The method executed by the watchdog process when the trigger
condition
* is met.
*/
void execute();
}
Some questions:
- How is WatchdogTarget associated with Watchdog ? The association is not
apparent.
- From the interface it appears there is a one to one mapping between a
watched object and watchdog. This seems to impose an additional thread per
watched object. Could this lead to scalability issues. For instance if there
are 100 threads that can be associated with a Handler, can there now be at
most 50 concurrent handlers ?
- Is WatchDogTarget really needed ? Can Runnable act as WatchDog target ?
Harmeet
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>