code: @Override
      public void close() {
          if (this.closed.compareAndSet(false, true)) {
              RocksDB db = this.database.get();
              if (db != null) {
                  db.close();
                  this.database.set(null);
              }
  
              if (this.writeOptions != null) {
                  this.writeOptions.close();
              }
  
              if (this.databaseOptions != null) {
                  this.databaseOptions.close();
              }
  
              clear(false);
              log.info("{}: Closed.", this.logId);
  
              Consumer<String> callback = this.closeCallback;
              if (callback != null) {
                  Callbacks.invokeSafely(callback, this.id, null);
              }
          }
      }
docs: region AutoCloseable Implementation