Commit 17459672 authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Add a method to cancel a Monitor task

parent 4a0841f2
......@@ -127,6 +127,19 @@ public final class MonitorFactory {
return m;
}
/**
* Cancel a monitoring task
*
* @param m the Monitor object to stop calling periodically
*/
public static void stopMonitor(final Monitor m) {
synchronized (monitors) {
monitors.values().remove(m);
}
m.future.cancel(false);
}
/**
* Enable periodic sending of background host monitoring
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment