public void stop(){
synchronized (lock) {
    schedulerService.shutdownNow();
    state=State.STOPPED;
  }
}

public void stop ( ) { synchronized ( lock ) { schedulerService . shutdownNow ( ) ; state = State . STOPPED ; } }
stops the monitor . once it stops , it cannot be restarted .
