/** * Shuts down the monitoring engine. This method should be called before shutting down the * application to give the ERMA system a chance to cleanly close all its resources. * <p> * * This call disables ERMA and calls shutdown() on the {@link MonitorProcessorFactory} supplied. * <p> * * <b>This method is not thread-safe.</b> Client should take care to ensure that multithreaded * access to this method is synchronized. */ public void shutdown() { if (running) { log.info("MonitoringEngine shutting down"); globalAttributes.clear(); monitorProcessorLevels.clear(); monitorLevels.clear(); running = false; processorFactory.shutdown(); inheritableStrategy.shutdown(); } }