code: final void closeAndRemoveAllDatabaseHandles() {
          for (Database databaseHandle : this.databaseHandles) {
              try {
                  databaseHandle.close();
              } catch (EnvironmentFailureException | IllegalStateException ex) {
                  LOGGER.log(Level.SEVERE,
                          "Error closing databases", ex);
              }
          }
          this.databaseHandles.clear();
      }
docs: Closes all databases that this factory instance previously created.
  
  @throws EnvironmentFailureException if an unexpected, internal or
  environment-wide failure occurs.
  @throws IllegalStateException if the database has been closed.