public void disable() throws IOException {
synchronized (optOutLock) {
    if (!isOptOut()) {
      configuration.set("opt-out",true);
      configuration.save(configurationFile);
    }
    if (task != null) {
      task.cancel();
      task=null;
    }
  }
}

public void disable ( ) throws IOException { synchronized ( optOutLock ) { if ( ! isOptOut ( ) ) { configuration . set ( "opt-out" , true ) ; configuration . save ( configurationFile ) ; } if ( task != null ) { task . cancel ( ) ; task = null ; } } }
disables metrics for the server by setting " opt - out " to true in the config file and canceling the metrics task .
