code: @Override
      public void close() {
          if (!this.closed.getAndSet(true)) {
              if (state() == State.RUNNING) {
                  Futures.await(Services.stopAsync(this, this.executorService));
              }
  
              synchronized (this.clients) {
                  this.clients.clear();
              }
  
              this.metrics.close();
              log.info("{} Closed.", TRACE_OBJECT_ID);
          }
      }
docs: region AutoCloseable Implementation