public synchronized void stopCollect() { started = false; if(allStarters != null) for(Starter s: allStarters.values()) { try { s.doStop(); } catch (Exception e) { log(Level.ERROR, e, "Unable to stop timer %s: %s", s.getKey(), e); } } }
/** * Ensure that all collects are stopped, some slow probes might need a * little help */ public void stop() { started = false; if(collectTimer != null) collectTimer.cancel(); collectTimer = null; for(Starter s: topStarters) { s.doStop(); } for(jrds.starter.Timer t: timers.values()) { t.stopCollect(); for(HostStarter h: t.getAllHosts()) { h.stopCollect(); for(Probe<?, ?> p: h.getAllProbes()) { p.stopCollect(); } } t.interrupt(); } }