public static void onGridStop() throws InterruptedException {
synchronized (mux) {
    if (gridCnt == 0)     return;
    --gridCnt;
    Thread timer0=timer;
    if (gridCnt == 0 && timer0 != null) {
      timer=null;
      timer0.interrupt();
      timer0.join();
    }
  }
}

public static void onGridStop ( ) throws InterruptedException { synchronized ( mux ) { if ( gridCnt == 0 ) return ; -- gridCnt ; Thread timer0 = timer ; if ( gridCnt == 0 && timer0 != null ) { timer = null ; timer0 . interrupt ( ) ; timer0 . join ( ) ; } } }
stops clock timer if all nodes into jvm were stopped .
