public void stop(){
  if (onSyncRequestSubscriber != null) {
    onSyncRequestSubscriber.unsubscribe();
  }
  if (onFdEventSubscriber != null) {
    onFdEventSubscriber.unsubscribe();
  }
  if (onGossipRequestSubscriber != null) {
    onGossipRequestSubscriber.unsubscribe();
  }
  if (onSyncAckResponseSubscriber != null) {
    onSyncAckResponseSubscriber.unsubscribe();
  }
  if (syncTask != null) {
    syncTask.cancel(true);
  }
  for (  String memberId : removeMemberTasks.keySet()) {
    ScheduledFuture<?> future=removeMemberTasks.get(memberId);
    if (future != null) {
      future.cancel(true);
    }
  }
  removeMemberTasks.clear();
  executor.shutdown();
  subject.onCompleted();
}

public void stop ( ) { if ( onSyncRequestSubscriber != null ) { onSyncRequestSubscriber . unsubscribe ( ) ; } if ( onFdEventSubscriber != null ) { onFdEventSubscriber . unsubscribe ( ) ; } if ( onGossipRequestSubscriber != null ) { onGossipRequestSubscriber . unsubscribe ( ) ; } if ( onSyncAckResponseSubscriber != null ) { onSyncAckResponseSubscriber . unsubscribe ( ) ; } if ( syncTask != null ) { syncTask . cancel ( true ) ; } for ( String memberId : removeMemberTasks . keySet ( ) ) { ScheduledFuture < ? > future = removeMemberTasks . get ( memberId ) ; if ( future != null ) { future . cancel ( true ) ; } } removeMemberTasks . clear ( ) ; executor . shutdown ( ) ; subject . onCompleted ( ) ; }
stops running cluster membership protocol and releases occupied resources .
