mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
06.49.2013 5e2e412e8dfc3d21be9f96ec88e05962c33fdf9a
opends/src/server/org/opends/server/replication/server/DraftCNDbHandler.java
@@ -178,6 +178,22 @@
  }
  /**
   * Returns whether this database is empty.
   * <p>
   * FIXME Find a way to implement this method in a more efficient manner.
   * {@link Database#count()} javadoc mentions: <blockquote>Note that this
   * method does scan a significant portion of the database and should be
   * considered a fairly expensive operation.</blockquote>
   *
   * @return <code>true</code> if this database is empty, <code>false</code>
   *         otherwise
   */
  public boolean isEmpty()
  {
    return count() == 0;
  }
  /**
   * Get a read cursor on the database from a provided key.
   * The cursor MUST be released after use.
   * @param key The provided key.