From eeee7d47158a5e22aaf3d98f45db724ba4f60f1b Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 23 Jan 2015 12:27:03 +0000
Subject: [PATCH] Reduce methods visibility Fixed up javadocs

---
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2URI.java    |   35 ++---
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/NullIndex.java |   35 ++---
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java           |    6 
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java  |   37 +++---
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java          |   39 ++----
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/Index.java     |   10 +
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/State.java     |    9 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java        |    7 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java        |   25 +--
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2ID.java           |    4 
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/ID2Entry.java  |    8 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java       |   74 +++++-------
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2ID.java     |    4 
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/State.java           |   12 +-
 14 files changed, 135 insertions(+), 170 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2ID.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2ID.java
index 55c204c..19d17e9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2ID.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2ID.java
@@ -81,7 +81,7 @@
    * @throws DatabaseException If an error occurred while attempting to insert
    * the new record.
    */
-  public boolean insert(Transaction txn, DN dn, EntryID id) throws DatabaseException
+  boolean insert(Transaction txn, DN dn, EntryID id) throws DatabaseException
   {
     DatabaseEntry key = new DatabaseEntry(dnToDNKey(dn, prefixRDNComponents));
     DatabaseEntry data = id.getDatabaseEntry();
@@ -115,7 +115,7 @@
    * @throws DatabaseException If an error occurred while attempting to remove
    * the record.
    */
-  public boolean remove(Transaction txn, DN dn) throws DatabaseException
+  boolean remove(Transaction txn, DN dn) throws DatabaseException
   {
     DatabaseEntry key = new DatabaseEntry(dnToDNKey(dn, prefixRDNComponents));
 
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java
index a4b4fed..125c869 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/DN2URI.java
@@ -26,6 +26,13 @@
  */
 package org.opends.server.backends.jeb;
 
+import static com.sleepycat.je.LockMode.*;
+import static com.sleepycat.je.OperationStatus.*;
+
+import static org.opends.messages.JebMessages.*;
+import static org.opends.server.backends.jeb.JebFormat.*;
+import static org.opends.server.util.ServerConstants.*;
+
 import java.util.*;
 
 import org.forgerock.i18n.LocalizableMessage;
@@ -44,13 +51,6 @@
 
 import com.sleepycat.je.*;
 
-import static com.sleepycat.je.LockMode.*;
-import static com.sleepycat.je.OperationStatus.*;
-
-import static org.opends.messages.JebMessages.*;
-import static org.opends.server.backends.jeb.JebFormat.*;
-import static org.opends.server.util.ServerConstants.*;
-
 /**
  * This class represents the referral database which contains URIs from referral
  * entries.
@@ -189,8 +189,7 @@
    * @return true if the values were deleted, false if not.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public boolean delete(Transaction txn, DN dn)
-       throws DatabaseException
+  boolean delete(Transaction txn, DN dn) throws DatabaseException
   {
     byte[] normDN = JebFormat.dnToDNKey(dn, prefixRDNComponents);
     DatabaseEntry key = new DatabaseEntry(normDN);
@@ -212,8 +211,7 @@
    * @return true if the value was deleted, false if not.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public boolean delete(Transaction txn, DN dn, String labeledURI)
-       throws DatabaseException
+  private boolean delete(Transaction txn, DN dn, String labeledURI) throws DatabaseException
   {
     CursorConfig cursorConfig = null;
     byte[] normDN = JebFormat.dnToDNKey(dn, prefixRDNComponents);
@@ -296,8 +294,7 @@
    * @param mods The sequence of modifications made to the entry.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public void modifyEntry(Transaction txn, Entry before, Entry after,
-                          List<Modification> mods)
+  void modifyEntry(Transaction txn, Entry before, Entry after, List<Modification> mods)
        throws DatabaseException
   {
     DN entryDN = before.getName();
@@ -407,8 +404,7 @@
    * @param entry The entry to be deleted.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public void deleteEntry(Transaction txn, Entry entry)
-       throws DatabaseException
+  void deleteEntry(Transaction txn, Entry entry) throws DatabaseException
   {
     Set<String> labeledURIs = entry.getReferralURLs();
     if (labeledURIs != null)
@@ -428,8 +424,7 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void checkTargetForReferral(Entry entry, SearchScope searchScope)
-       throws DirectoryException
+  void checkTargetForReferral(Entry entry, SearchScope searchScope) throws DirectoryException
   {
     Set<String> referralURLs = entry.getReferralURLs();
     if (referralURLs != null)
@@ -452,9 +447,7 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void throwReferralException(DN targetDN, DN referralDN,
-                                     Set<String> labeledURIs,
-                                     SearchScope searchScope)
+  private void throwReferralException(DN targetDN, DN referralDN, Set<String> labeledURIs, SearchScope searchScope)
        throws DirectoryException
   {
     ArrayList<String> URIList = new ArrayList<String>(labeledURIs.size());
@@ -532,8 +525,7 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void targetEntryReferrals(DN targetDN, SearchScope searchScope)
-       throws DirectoryException
+  void targetEntryReferrals(DN targetDN, SearchScope searchScope) throws DirectoryException
   {
     if (containsReferrals == ConditionResult.UNDEFINED)
     {
@@ -601,8 +593,7 @@
    *          has been reached or the search has been abandoned).
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean returnSearchReferences(SearchOperation searchOp)
-       throws DirectoryException
+  boolean returnSearchReferences(SearchOperation searchOp) throws DirectoryException
   {
     if (containsReferrals == ConditionResult.UNDEFINED)
     {
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java
index a594cb9..0bdc6b7 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/ID2Entry.java
@@ -298,8 +298,7 @@
    * @throws  DirectoryException  If a problem occurs while attempting to encode
    *                              the entry.
    */
-  public static ByteString entryToDatabase(Entry entry, DataConfig dataConfig)
-      throws DirectoryException
+  static ByteString entryToDatabase(Entry entry, DataConfig dataConfig) throws DirectoryException
   {
     EntryCodec codec = acquireEntryCodec();
     try
@@ -326,7 +325,7 @@
    * @throws  DirectoryException  If a problem occurs while attempting to encode
    *                              the entry.
    */
-  public boolean insert(Transaction txn, EntryID id, Entry entry)
+  boolean insert(Transaction txn, EntryID id, Entry entry)
        throws DatabaseException, DirectoryException
   {
     DatabaseEntry key = id.getDatabaseEntry();
@@ -377,7 +376,7 @@
    * @return true if the entry was removed, false if it was not.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public boolean remove(Transaction txn, EntryID id) throws DatabaseException
+  boolean remove(Transaction txn, EntryID id) throws DatabaseException
   {
     DatabaseEntry key = id.getDatabaseEntry();
     return delete(txn, key) == SUCCESS;
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
index 23e8bb3..74fdc95 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/Index.java
@@ -127,7 +127,7 @@
    * @throws DatabaseException If an error occurs in the JE database.
    */
   @SuppressWarnings("unchecked")
-  public Index(String name, Indexer indexer, State state,
+  Index(String name, Indexer indexer, State state,
         int indexEntryLimit, int cursorEntryLimit, boolean maintainCount,
         Environment env, EntryContainer entryContainer)
       throws DatabaseException
@@ -165,7 +165,7 @@
    * @param keyBytes         The index key bytes.
    * @param entryID     The entry ID.
    */
-  public void insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  void insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).addEntryID(keyBytes, entryID);
   }
@@ -431,7 +431,7 @@
    * @param keyBytes    The index key bytes.
    * @param entryID     The entry ID.
    */
-  public void removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  void removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).deleteEntryID(keyBytes, entryID);
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java
index 4b32941..9611709 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/NullIndex.java
@@ -20,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- *      Copyright 2011-2014 ForgeRock AS
+ *      Copyright 2011-2015 ForgeRock AS
  */
 package org.opends.server.backends.jeb;
 
@@ -60,32 +60,30 @@
    * @throws DatabaseException
    *           If an error occurs in the JE database.
    */
-  public NullIndex(String name, Indexer indexer, State state, Environment env,
-      EntryContainer entryContainer) throws DatabaseException
+  public NullIndex(String name, Indexer indexer, State state, Environment env, EntryContainer entryContainer)
+      throws DatabaseException
   {
     super(name, indexer, state, 0, 0, false, env, entryContainer);
   }
 
   /** {@inheritDoc} */
   @Override
-  public void insert(DatabaseEntry key, ImportIDSet importIdSet,
-      DatabaseEntry data) throws DatabaseException
+  public void insert(DatabaseEntry key, ImportIDSet importIdSet, DatabaseEntry data) throws DatabaseException
   {
     // Do nothing.
   }
 
   /** {@inheritDoc} */
   @Override
-  public void delete(DatabaseEntry key, ImportIDSet importIdSet,
-      DatabaseEntry data) throws DatabaseException
+  public void delete(DatabaseEntry key, ImportIDSet importIdSet, DatabaseEntry data) throws DatabaseException
   {
     // Do nothing.
   }
 
   /** {@inheritDoc} */
   @Override
-  void updateKey(Transaction txn, DatabaseEntry key, EntryIDSet deletedIDs,
-      EntryIDSet addedIDs) throws DatabaseException
+  void updateKey(Transaction txn, DatabaseEntry key, EntryIDSet deletedIDs, EntryIDSet addedIDs)
+      throws DatabaseException
   {
     // Do nothing.
   }
@@ -99,32 +97,28 @@
 
   /** {@inheritDoc} */
   @Override
-  public ConditionResult containsID(Transaction txn, DatabaseEntry key,
-      EntryID entryID) throws DatabaseException
+  public ConditionResult containsID(Transaction txn, DatabaseEntry key, EntryID entryID) throws DatabaseException
   {
     return ConditionResult.UNDEFINED;
   }
 
   /** {@inheritDoc} */
   @Override
-  public EntryIDSet readKey(DatabaseEntry key, Transaction txn,
-      LockMode lockMode)
+  public EntryIDSet readKey(DatabaseEntry key, Transaction txn, LockMode lockMode)
   {
     return new EntryIDSet();
   }
 
   /** {@inheritDoc} */
   @Override
-  public void writeKey(Transaction txn, DatabaseEntry key,
-      EntryIDSet entryIDList) throws DatabaseException
+  public void writeKey(Transaction txn, DatabaseEntry key, EntryIDSet entryIDList) throws DatabaseException
   {
     // Do nothing.
   }
 
   /** {@inheritDoc} */
   @Override
-  public EntryIDSet readRange(byte[] lower, byte[] upper,
-      boolean lowerIncluded, boolean upperIncluded)
+  public EntryIDSet readRange(byte[] lower, byte[] upper, boolean lowerIncluded, boolean upperIncluded)
   {
     return new EntryIDSet();
   }
@@ -154,8 +148,8 @@
 
   /** {@inheritDoc} */
   @Override
-  public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry,
-      Entry newEntry, List<Modification> mods, IndexingOptions options) throws DatabaseException
+  public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, List<Modification> mods,
+      IndexingOptions options) throws DatabaseException
   {
     // Do nothing.
   }
@@ -176,8 +170,7 @@
 
   /** {@inheritDoc} */
   @Override
-  public void setTrusted(Transaction txn, boolean trusted)
-      throws DatabaseException
+  public void setTrusted(Transaction txn, boolean trusted) throws DatabaseException
   {
     // Do nothing.
   }
@@ -226,31 +219,14 @@
 
   /** {@inheritDoc} */
   @Override
-  protected OperationStatus put(Transaction txn, DatabaseEntry key,
-      DatabaseEntry data) throws DatabaseException
+  OperationStatus put(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
   {
     return OperationStatus.SUCCESS;
   }
 
   /** {@inheritDoc} */
   @Override
-  protected OperationStatus read(Transaction txn, DatabaseEntry key,
-      DatabaseEntry data, LockMode lockMode) throws DatabaseException
-  {
-    return OperationStatus.SUCCESS;
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  protected OperationStatus insert(Transaction txn, DatabaseEntry key,
-      DatabaseEntry data) throws DatabaseException
-  {
-    return OperationStatus.SUCCESS;
-  }
-
-  /** {@inheritDoc} */
-  @Override
-  protected OperationStatus delete(Transaction txn, DatabaseEntry key)
+  OperationStatus read(Transaction txn, DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
       throws DatabaseException
   {
     return OperationStatus.SUCCESS;
@@ -258,8 +234,21 @@
 
   /** {@inheritDoc} */
   @Override
-  public Cursor openCursor(Transaction txn, CursorConfig cursorConfig)
-      throws DatabaseException
+  OperationStatus insert(Transaction txn, DatabaseEntry key, DatabaseEntry data) throws DatabaseException
+  {
+    return OperationStatus.SUCCESS;
+  }
+
+  /** {@inheritDoc} */
+  @Override
+  OperationStatus delete(Transaction txn, DatabaseEntry key) throws DatabaseException
+  {
+    return OperationStatus.SUCCESS;
+  }
+
+  /** {@inheritDoc} */
+  @Override
+  public Cursor openCursor(Transaction txn, CursorConfig cursorConfig) throws DatabaseException
   {
     throw new IllegalStateException();
   }
@@ -277,5 +266,4 @@
   {
     return new PreloadStats();
   }
-
 }
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/State.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/State.java
index 1e43ec8..32d79b7 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/State.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/State.java
@@ -22,19 +22,19 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
- *      Portions copyright 2011-2014 ForgeRock AS
+ *      Portions copyright 2011-2015 ForgeRock AS
  */
 package org.opends.server.backends.jeb;
 
+import static com.sleepycat.je.LockMode.*;
+import static com.sleepycat.je.OperationStatus.*;
+
 import java.util.Arrays;
 
 import org.opends.server.util.StaticUtils;
 
 import com.sleepycat.je.*;
 
-import static com.sleepycat.je.LockMode.*;
-import static com.sleepycat.je.OperationStatus.*;
-
 /**
  * This class is responsible for storing the configuration state of
  * the JE backend for a particular suffix.
@@ -84,7 +84,7 @@
    * @return true if the entry was removed, false if it was not.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public boolean removeIndexTrustState(Transaction txn, DatabaseContainer index)
+  boolean removeIndexTrustState(Transaction txn, DatabaseContainer index)
        throws DatabaseException
   {
     DatabaseEntry key = keyForIndex(index);
@@ -120,7 +120,7 @@
    * @param trusted The state value to put into the database.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public void putIndexTrustState(Transaction txn, DatabaseContainer index, boolean trusted)
+  void putIndexTrustState(Transaction txn, DatabaseContainer index, boolean trusted)
        throws DatabaseException
   {
     DatabaseEntry key = keyForIndex(index);
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java
index fc6ee5c..32b60aa 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/VLVIndex.java
@@ -37,6 +37,7 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
 import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.ByteString;
@@ -57,7 +58,6 @@
 import org.opends.server.protocols.ldap.LDAPResultCode;
 import org.opends.server.types.Attribute;
 import org.opends.server.types.AttributeType;
-import org.forgerock.opendj.config.server.ConfigChangeResult;
 import org.opends.server.types.DN;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.Entry;
@@ -124,8 +124,7 @@
    * @throws ConfigException if a error occurs while reading the VLV index
    * configuration
    */
-  public VLVIndex(LocalDBVLVIndexCfg config, State state, Environment env,
-                  EntryContainer entryContainer)
+  VLVIndex(LocalDBVLVIndexCfg config, State state, Environment env, EntryContainer entryContainer)
       throws DatabaseException, ConfigException
   {
     super(entryContainer.getDatabasePrefix()+"_vlv."+config.getName(),
@@ -290,8 +289,7 @@
    * @throws DirectoryException If a Directory Server
    * error occurs.
    */
-  public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
-      throws DirectoryException
+  boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
   {
     if (shouldInclude(entry))
     {
@@ -312,8 +310,7 @@
    * or False otherwise.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
-      throws DirectoryException
+  boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
   {
     if (shouldInclude(entry))
     {
@@ -339,7 +336,7 @@
    * JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean modifyEntry(IndexBuffer buffer,
+  boolean modifyEntry(IndexBuffer buffer,
                           EntryID entryID,
                           Entry oldEntry,
                           Entry newEntry,
@@ -419,7 +416,7 @@
    * JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public SortValuesSet getSortValuesSet(Transaction txn, long entryID,
+  SortValuesSet getSortValuesSet(Transaction txn, long entryID,
       ByteString[] values, AttributeType[] types) throws DatabaseException,
       DirectoryException
   {
@@ -479,7 +476,7 @@
    * JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean containsValues(Transaction txn, long entryID,
+  boolean containsValues(Transaction txn, long entryID,
       ByteString[] values, AttributeType[] types) throws JebException,
       DatabaseException, DirectoryException
   {
@@ -579,9 +576,7 @@
    * @throws DirectoryException If a Directory Server
    * error occurs.
    */
-  public void updateIndex(Transaction txn,
-                          TreeSet<SortValues> addedValues,
-                          TreeSet<SortValues> deletedValues)
+  void updateIndex(Transaction txn, TreeSet<SortValues> addedValues, TreeSet<SortValues> deletedValues)
       throws DirectoryException, DatabaseException
   {
     // Handle cases where nothing is changed early to avoid
@@ -737,7 +732,7 @@
    * @throws DirectoryException If a Directory Server error occurs.
    * @throws DatabaseException If an error occurs in the JE database.
    */
-  public EntryIDSet evaluate(Transaction txn,
+  EntryIDSet evaluate(Transaction txn,
                              SearchOperation searchOperation,
                              ServerSideSortRequestControl sortControl,
                              VLVRequestControl vlvRequest,
@@ -1230,7 +1225,7 @@
    *         otherwise.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean shouldInclude(Entry entry) throws DirectoryException
+  boolean shouldInclude(Entry entry) throws DirectoryException
   {
     DN entryDN = entry.getName();
     return entryDN.matchesBaseAndScope(baseDN, scope)
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2ID.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2ID.java
index 4c090ba6..607da42 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2ID.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2ID.java
@@ -73,7 +73,7 @@
    * @throws StorageRuntimeException If an error occurred while attempting to insert
    * the new record.
    */
-  public boolean insert(WriteableStorage txn, DN dn, EntryID id) throws StorageRuntimeException
+  boolean insert(WriteableStorage txn, DN dn, EntryID id) throws StorageRuntimeException
   {
     ByteString key = dnToDNKey(dn, prefixRDNComponents);
     ByteString value = id.toByteString();
@@ -129,7 +129,7 @@
    * @throws StorageRuntimeException If an error occurred while attempting to remove
    * the record.
    */
-  public boolean remove(WriteableStorage txn, DN dn) throws StorageRuntimeException
+  boolean remove(WriteableStorage txn, DN dn) throws StorageRuntimeException
   {
     ByteString key = dnToDNKey(dn, prefixRDNComponents);
 
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2URI.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2URI.java
index fa9d68a..355f8c2 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2URI.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/DN2URI.java
@@ -26,6 +26,9 @@
  */
 package org.opends.server.backends.pluggable;
 
+import static org.opends.messages.JebMessages.*;
+import static org.opends.server.util.ServerConstants.*;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -60,9 +63,6 @@
 
 import com.forgerock.opendj.util.Pair;
 
-import static org.opends.messages.JebMessages.*;
-import static org.opends.server.util.ServerConstants.*;
-
 /**
  * This class represents the referral database which contains URIs from referral
  * entries.
@@ -206,7 +206,7 @@
    * @return true if the values were deleted, false if not.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public boolean delete(WriteableStorage txn, DN dn) throws StorageRuntimeException
+  boolean delete(WriteableStorage txn, DN dn) throws StorageRuntimeException
   {
     ByteString key = toKey(dn);
 
@@ -227,8 +227,7 @@
    * @return true if the value was deleted, false if not.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public boolean delete(WriteableStorage txn, DN dn, Collection<String> labeledURIs)
-       throws StorageRuntimeException
+  boolean delete(WriteableStorage txn, DN dn, Collection<String> labeledURIs) throws StorageRuntimeException
   {
     ByteString key = toKey(dn);
 
@@ -251,7 +250,6 @@
    * Indicates whether the underlying database contains any referrals.
    *
    * @param  txn  The transaction to use when making the determination.
-   *
    * @return  {@code true} if it is believed that the underlying database may
    *          contain at least one referral, or {@code false} if it is certain
    *          that it doesn't.
@@ -287,9 +285,8 @@
    * @param mods The sequence of modifications made to the entry.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public void modifyEntry(WriteableStorage txn, Entry before, Entry after,
-                          List<Modification> mods)
-       throws StorageRuntimeException
+  void modifyEntry(WriteableStorage txn, Entry before, Entry after, List<Modification> mods)
+      throws StorageRuntimeException
   {
     DN entryDN = before.getName();
     for (Modification mod : mods)
@@ -395,8 +392,7 @@
    * @param entry The entry to be deleted.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public void deleteEntry(WriteableStorage txn, Entry entry)
-       throws StorageRuntimeException
+  void deleteEntry(WriteableStorage txn, Entry entry) throws StorageRuntimeException
   {
     Set<String> labeledURIs = entry.getReferralURLs();
     if (labeledURIs != null)
@@ -416,8 +412,7 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void checkTargetForReferral(Entry entry, SearchScope searchScope)
-       throws DirectoryException
+  void checkTargetForReferral(Entry entry, SearchScope searchScope) throws DirectoryException
   {
     Set<String> referralURLs = entry.getReferralURLs();
     if (referralURLs != null)
@@ -440,8 +435,8 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void throwReferralException(DN targetDN, DN referralDN, Collection<String> labeledURIs, SearchScope searchScope)
-       throws DirectoryException
+  void throwReferralException(DN targetDN, DN referralDN, Collection<String> labeledURIs, SearchScope searchScope)
+      throws DirectoryException
   {
     ArrayList<String> URIList = new ArrayList<String>(labeledURIs.size());
     for (String labeledURI : labeledURIs)
@@ -510,6 +505,7 @@
 
   /**
    * Process referral entries that are above the target DN of an operation.
+   * @param txn The transaction to use when making the determination.
    * @param targetDN The target DN of the operation, or the base object of a
    * search operation.
    * @param searchScope The scope of the search operation, or null if the
@@ -518,8 +514,7 @@
    * DN.  The referral URLs will be set appropriately for the references found
    * in the referral entry.
    */
-  public void targetEntryReferrals(ReadableStorage txn, DN targetDN, SearchScope searchScope)
-       throws DirectoryException
+  void targetEntryReferrals(ReadableStorage txn, DN targetDN, SearchScope searchScope) throws DirectoryException
   {
     if (containsReferrals == ConditionResult.UNDEFINED)
     {
@@ -564,6 +559,7 @@
   /**
    * Return search result references for a search operation using the referral
    * database to find all referral entries within scope of the search.
+   * @param txn The transaction to use when making the determination.
    * @param searchOp The search operation for which search result references
    * should be returned.
    * @return  <CODE>true</CODE> if the caller should continue processing the
@@ -572,8 +568,7 @@
    *          has been reached or the search has been abandoned).
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean returnSearchReferences(ReadableStorage txn, SearchOperation searchOp)
-       throws DirectoryException
+  boolean returnSearchReferences(ReadableStorage txn, SearchOperation searchOp) throws DirectoryException
   {
     if (containsReferrals == ConditionResult.UNDEFINED)
     {
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/ID2Entry.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/ID2Entry.java
index 361ef01..90b83a0 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/ID2Entry.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/ID2Entry.java
@@ -298,8 +298,7 @@
    * @throws  DirectoryException  If a problem occurs while attempting to encode
    *                              the entry.
    */
-  public static ByteString entryToDatabase(Entry entry, DataConfig dataConfig)
-      throws DirectoryException
+  static ByteString entryToDatabase(Entry entry, DataConfig dataConfig) throws DirectoryException
   {
     EntryCodec codec = acquireEntryCodec();
     try
@@ -326,8 +325,7 @@
    * @throws  DirectoryException  If a problem occurs while attempting to encode
    *                              the entry.
    */
-  public boolean insert(WriteableStorage txn, EntryID id, Entry entry)
-       throws StorageRuntimeException, DirectoryException
+  boolean insert(WriteableStorage txn, EntryID id, Entry entry) throws StorageRuntimeException, DirectoryException
   {
     ByteString key = id.toByteString();
     EntryCodec codec = acquireEntryCodec();
@@ -376,7 +374,7 @@
    * @return true if the entry was removed, false if it was not.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public boolean remove(WriteableStorage txn, EntryID id) throws StorageRuntimeException
+  boolean remove(WriteableStorage txn, EntryID id) throws StorageRuntimeException
   {
     return delete(txn, id.toByteString());
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/Index.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/Index.java
index ce560f5..c6495d9 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/Index.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/Index.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2012-2014 ForgeRock AS
+ *      Portions Copyright 2012-2015 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -118,10 +118,11 @@
    * @param maintainCount Whether to maintain a count of IDs for a key once
    * the entry limit has exceeded.
    * @param storage The JE Storage
+   * @param txn The transaction to use when creating this object
    * @param entryContainer The database entryContainer holding this index.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public Index(TreeName name, Indexer indexer, State state,
+  Index(TreeName name, Indexer indexer, State state,
         int indexEntryLimit, int cursorEntryLimit, boolean maintainCount,
         Storage storage, WriteableStorage txn, EntryContainer entryContainer)
       throws StorageRuntimeException
@@ -149,7 +150,7 @@
    * @param keyBytes         The index key bytes.
    * @param entryID     The entry ID.
    */
-  public void insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  void insertID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).addEntryID(keyBytes, entryID);
   }
@@ -331,7 +332,7 @@
    * @param keyBytes    The index key bytes.
    * @param entryID     The entry ID.
    */
-  public void removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
+  void removeID(IndexBuffer buffer, ByteString keyBytes, EntryID entryID)
   {
     getBufferedIndexValues(buffer, keyBytes).deleteEntryID(keyBytes, entryID);
   }
@@ -471,6 +472,7 @@
    * Reads a range of keys and collects all their entry IDs into a
    * single set.
    *
+   * @param txn The transaction to use for the operation
    * @param lower The lower bound of the range. A 0 length byte array indicates
    *                      no lower bound and the range will start from the
    *                      smallest key.
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/NullIndex.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/NullIndex.java
index 8f18485..536d6f4 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/NullIndex.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/NullIndex.java
@@ -20,7 +20,7 @@
  *
  * CDDL HEADER END
  *
- *      Copyright 2011-2014 ForgeRock AS
+ *      Copyright 2011-2015 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -52,12 +52,13 @@
    * @param name
    *          The name of the index database within the entryContainer.
    * @param indexer
-   *          The indexer object to construct index keys from LDAP attribute
-   *          values.
+   *          The indexer object to construct index keys from LDAP attribute values.
    * @param state
    *          The state database to persist index state info.
    * @param storage
    *          The JE Storage
+   * @param txn
+   *          The transaction to use when creating this object
    * @param entryContainer
    *          The database entryContainer holding this index.
    * @throws StorageRuntimeException
@@ -71,8 +72,8 @@
 
   /** {@inheritDoc} */
   @Override
-  void updateKey(WriteableStorage txn, ByteString key, EntryIDSet deletedIDs,
-      EntryIDSet addedIDs) throws StorageRuntimeException
+  void updateKey(WriteableStorage txn, ByteString key, EntryIDSet deletedIDs, EntryIDSet addedIDs)
+      throws StorageRuntimeException
   {
     // Do nothing.
   }
@@ -86,8 +87,8 @@
 
   /** {@inheritDoc} */
   @Override
-  public ConditionResult containsID(ReadableStorage txn, ByteString key,
-      EntryID entryID) throws StorageRuntimeException
+  public ConditionResult containsID(ReadableStorage txn, ByteString key, EntryID entryID)
+      throws StorageRuntimeException
   {
     return ConditionResult.UNDEFINED;
   }
@@ -101,8 +102,7 @@
 
   /** {@inheritDoc} */
   @Override
-  public void writeKey(WriteableStorage txn, ByteString key,
-      EntryIDSet entryIDList) throws StorageRuntimeException
+  public void writeKey(WriteableStorage txn, ByteString key, EntryIDSet entryIDList) throws StorageRuntimeException
   {
     // Do nothing.
   }
@@ -140,8 +140,8 @@
 
   /** {@inheritDoc} */
   @Override
-  public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry,
-      Entry newEntry, List<Modification> mods, IndexingOptions options) throws StorageRuntimeException
+  public void modifyEntry(IndexBuffer buffer, EntryID entryID, Entry oldEntry, Entry newEntry, List<Modification> mods,
+      IndexingOptions options) throws StorageRuntimeException
   {
     // Do nothing.
   }
@@ -162,8 +162,7 @@
 
   /** {@inheritDoc} */
   @Override
-  public void setTrusted(WriteableStorage txn, boolean trusted)
-      throws StorageRuntimeException
+  public void setTrusted(WriteableStorage txn, boolean trusted) throws StorageRuntimeException
   {
     // Do nothing.
   }
@@ -212,29 +211,27 @@
 
   /** {@inheritDoc} */
   @Override
-  protected void put(WriteableStorage txn, ByteSequence key, ByteSequence value) throws StorageRuntimeException
+  void put(WriteableStorage txn, ByteSequence key, ByteSequence value) throws StorageRuntimeException
   {
   }
 
   /** {@inheritDoc} */
   @Override
-  protected ByteString read(ReadableStorage txn, ByteSequence key, boolean isRMW) throws StorageRuntimeException
+  ByteString read(ReadableStorage txn, ByteSequence key, boolean isRMW) throws StorageRuntimeException
   {
     return null;
   }
 
   /** {@inheritDoc} */
   @Override
-  protected boolean insert(WriteableStorage txn, ByteString key,
-      ByteString value) throws StorageRuntimeException
+  boolean insert(WriteableStorage txn, ByteString key, ByteString value) throws StorageRuntimeException
   {
     return true;
   }
 
   /** {@inheritDoc} */
   @Override
-  protected boolean delete(WriteableStorage txn, ByteSequence key)
-      throws StorageRuntimeException
+  boolean delete(WriteableStorage txn, ByteSequence key) throws StorageRuntimeException
   {
     return true;
   }
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/State.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/State.java
index 09fad97..62270a0 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/State.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/State.java
@@ -22,7 +22,7 @@
  *
  *
  *      Copyright 2006-2008 Sun Microsystems, Inc.
- *      Portions copyright 2011-2014 ForgeRock AS
+ *      Portions copyright 2011-2015 ForgeRock AS
  */
 package org.opends.server.backends.pluggable;
 
@@ -77,8 +77,7 @@
    * @return true if the entry was removed, false if it was not.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public boolean removeIndexTrustState(WriteableStorage txn, DatabaseContainer index)
-       throws StorageRuntimeException
+  boolean removeIndexTrustState(WriteableStorage txn, DatabaseContainer index) throws StorageRuntimeException
   {
     ByteString key = keyForIndex(index);
     return delete(txn, key);
@@ -111,8 +110,8 @@
    * @param trusted The state value to put into the database.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public void putIndexTrustState(WriteableStorage txn, DatabaseContainer index, boolean trusted)
-       throws StorageRuntimeException
+  void putIndexTrustState(WriteableStorage txn, DatabaseContainer index, boolean trusted)
+      throws StorageRuntimeException
   {
     ByteString key = keyForIndex(index);
 
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java
index 33a9830..97ce39e 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java
@@ -26,6 +26,9 @@
  */
 package org.opends.server.backends.pluggable;
 
+import static org.opends.messages.JebMessages.*;
+import static org.opends.server.util.StaticUtils.*;
+
 import java.util.Comparator;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -35,6 +38,7 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.config.server.ConfigChangeResult;
 import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.ByteSequence;
 import org.forgerock.opendj.ldap.ByteString;
@@ -62,7 +66,6 @@
 import org.opends.server.protocols.ldap.LDAPResultCode;
 import org.opends.server.types.Attribute;
 import org.opends.server.types.AttributeType;
-import org.forgerock.opendj.config.server.ConfigChangeResult;
 import org.opends.server.types.DN;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.Entry;
@@ -72,9 +75,6 @@
 import org.opends.server.types.SortOrder;
 import org.opends.server.util.StaticUtils;
 
-import static org.opends.messages.JebMessages.*;
-import static org.opends.server.util.StaticUtils.*;
-
 /**
  * This class represents a VLV index. Each database record is a sorted list
  * of entry IDs followed by sets of attribute values used to sort the entries.
@@ -122,7 +122,8 @@
    *                         index.
    * @param state            The state database to persist vlvIndex state info.
    * @param env              The JE Storage
-   * @param entryContainer   The database entryContainer holding this vlvIndex.
+   * @param entryContainer   The database entryContainer holding this vlvIndex. the sort order
+   * @param txn              The transaction to use when creating this object
    * @throws StorageRuntimeException
    *          If an error occurs in the JE database.
    * @throws ConfigException if a error occurs while reading the VLV index
@@ -269,8 +270,7 @@
    * @throws DirectoryException If a Directory Server
    * error occurs.
    */
-  public boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
-      throws DirectoryException
+  boolean addEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
   {
     if (shouldInclude(entry))
     {
@@ -291,8 +291,7 @@
    * or False otherwise.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry)
-      throws DirectoryException
+  boolean removeEntry(IndexBuffer buffer, EntryID entryID, Entry entry) throws DirectoryException
   {
     if (shouldInclude(entry))
     {
@@ -318,7 +317,7 @@
    * JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean modifyEntry(IndexBuffer buffer,
+  boolean modifyEntry(IndexBuffer buffer,
                           EntryID entryID,
                           Entry oldEntry,
                           Entry newEntry,
@@ -455,9 +454,8 @@
    * JE database.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean containsValues(ReadableStorage txn, long entryID,
-      ByteString[] values, AttributeType[] types)
-          throws StorageRuntimeException, DirectoryException
+  boolean containsValues(ReadableStorage txn, long entryID, ByteString[] values, AttributeType[] types)
+      throws StorageRuntimeException, DirectoryException
   {
     SortValuesSet valuesSet = getSortValuesSet(txn, entryID, values, types);
     int pos = valuesSet.binarySearch(entryID, values);
@@ -495,9 +493,7 @@
    * @throws DirectoryException If a Directory Server
    * error occurs.
    */
-  public void updateIndex(WriteableStorage txn,
-                          TreeSet<SortValues> addedValues,
-                          TreeSet<SortValues> deletedValues)
+  void updateIndex(WriteableStorage txn, TreeSet<SortValues> addedValues, TreeSet<SortValues> deletedValues)
       throws DirectoryException, StorageRuntimeException
   {
     // Handle cases where nothing is changed early to avoid
@@ -646,7 +642,7 @@
    * @throws DirectoryException If a Directory Server error occurs.
    * @throws StorageRuntimeException If an error occurs in the JE database.
    */
-  public EntryIDSet evaluate(ReadableStorage txn,
+  EntryIDSet evaluate(ReadableStorage txn,
                              SearchOperation searchOperation,
                              ServerSideSortRequestControl sortControl,
                              VLVRequestControl vlvRequest,
@@ -1114,7 +1110,7 @@
    *         otherwise.
    * @throws DirectoryException If a Directory Server error occurs.
    */
-  public boolean shouldInclude(Entry entry) throws DirectoryException
+  boolean shouldInclude(Entry entry) throws DirectoryException
   {
     DN entryDN = entry.getName();
     return entryDN.matchesBaseAndScope(baseDN, scope)
@@ -1392,6 +1388,11 @@
     }
   }
 
+  /**
+   * Returns the sort order of this VLV index.
+   *
+   * @return the sort order
+   */
   SortOrder getSortOrder()
   {
     return sortOrder;

--
Gitblit v1.10.0