public void shutdown(){
  gossipServiceRunning.set(false);
  gossipThreadExecutor.shutdown();
  gossipCore.shutdown();
  dataReaper.close();
  if (passiveGossipThread != null) {
    passiveGossipThread.shutdown();
  }
  if (activeGossipThread != null) {
    activeGossipThread.shutdown();
  }
  try {
    boolean result=gossipThreadExecutor.awaitTermination(1000,TimeUnit.MILLISECONDS);
    if (!result) {
      LOGGER.error("executor shutdown timed out");
    }
  }
 catch (  InterruptedException e) {
    LOGGER.error(e);
  }
}

public void shutdown ( ) { gossipServiceRunning . set ( false ) ; gossipThreadExecutor . shutdown ( ) ; gossipCore . shutdown ( ) ; dataReaper . close ( ) ; if ( passiveGossipThread != null ) { passiveGossipThread . shutdown ( ) ; } if ( activeGossipThread != null ) { activeGossipThread . shutdown ( ) ; } try { boolean result = gossipThreadExecutor . awaitTermination ( 1000 , TimeUnit . MILLISECONDS ) ; if ( ! result ) { LOGGER . error ( "executor shutdown timed out" ) ; } } catch ( InterruptedException e ) { LOGGER . error ( e ) ; } }
shutdown the gossip service .
