Ejemplo n.º 1
0
  @Override
  public void close() throws IOException {
    if (!state.compareAndSet(State.STARTED, State.CLOSED)) {
      return;
    }

    client.getConnectionStateListenable().removeListener(connectionStateListener);

    try {
      deleteNode();
    } catch (Exception e) {
      ThreadUtils.checkInterrupted(e);
      throw new IOException(e);
    }
  }