code: @Override
      public void close() {
          if (this.closed.compareAndSet(false, true)) {
              this.extensions.values().forEach(SegmentContainerExtension::close);
              Futures.await(Services.stopAsync(this, this.executor));
              this.metadataCleaner.close();
              this.writer.close();
              this.durableLog.close();
              this.readIndex.close();
              this.storage.close();
              log.info("{}: Closed.", this.traceObjectId);
          }
      }
docs: region AutoCloseable Implementation