SchedulerWatchdogFactorypublic class SchedulerWatchdogFactory extends Object implements WatchdogFactoryThis class is a factory to produce Watchdogs, each of which is associated
with a single TimeScheduler Target and a TimeScheduler object.
This could be used in James by adding a server configuration
parameter:
schedulerWatchdogs = conf.getChild("useSchedulerWatchdogs").getValueAsBoolean(false);
getting the TimeScheduler component:
scheduler = (TimeScheduler) compMgr.lookup(TimeScheduler.ROLE);
and changing AbstractJamesService.getWatchdogFactory to look
something like:
protected WatchdogFactory getWatchdogFactory() {
WatchdogFactory theWatchdogFactory = null;
if (schedulerWatchdogs) {
theWatchdogFactory = new SchedulerWatchdogFactory(scheduler, timeout);
} else {
theWatchdogFactory = new ThreadPerWatchdogFactory(threadPool, timeout);
}
if (theWatchdogFactory instanceof LogEnabled) {
((LogEnabled)theWatchdogFactory).enableLogging(getLogger());
}
return theWatchdogFactory;
} |
Fields Summary |
---|
private org.apache.avalon.cornerstone.services.scheduler.TimeScheduler | myTimeSchedulerThe thread pool used to generate InaccurateTimeoutWatchdogs | private long | timeout |
|