code: public synchronized void close()
      {
          Preconditions.checkState(state.compareAndSet(State.STARTED, State.CLOSED), "Already closed or has not been started");
  
          client.getConnectionStateListenable().removeListener(listener);
          executorService.close();
          ourTask.set(null);
      }
docs: Shutdown this selector and remove yourself from the leadership group