code: @Override
      public void close() {
          if (this.closed.compareAndSet(false, true)) {
              // Clean up the map, just in case the caller still has a pointer to this object.
              this.map.clear();
  
              Consumer<String> callback = this.closeCallback;
              if (callback != null) {
                  Callbacks.invokeSafely(callback, this.id, null);
              }
          }
      }
docs: region AutoCloseable Implementation