From ba6deb90899c025c0bd5e8b2bb169a90daa0e2aa Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 16 Dec 2014 10:13:02 +0000
Subject: [PATCH] OPENDJ-1602 (CR-5566) New pluggable storage based backend

---
 opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

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 2eaf778..37001ee 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
@@ -634,13 +634,13 @@
         // This is the last unbounded set.
         while(av != null)
         {
-          sortValuesSet.add(av.getEntryID(), av.getValues(), av.getTypes());
+          sortValuesSet.add(av);
           av = moveToNextSortValues(aValues);
         }
 
         while(dv != null)
         {
-          sortValuesSet.remove(dv.getEntryID(), dv.getValues());
+          sortValuesSet.remove(dv);
           dv = moveToNextSortValues(dValues);
         }
       }
@@ -650,13 +650,13 @@
 
         while(av != null && av.compareTo(maxValues) <= 0)
         {
-          sortValuesSet.add(av.getEntryID(), av.getValues(), av.getTypes());
+          sortValuesSet.add(av);
           av = moveToNextSortValues(aValues);
         }
 
         while(dv != null && dv.compareTo(maxValues) <= 0)
         {
-          sortValuesSet.remove(dv.getEntryID(), dv.getValues());
+          sortValuesSet.remove(dv);
           dv = moveToNextSortValues(dValues);
         }
       }
@@ -701,11 +701,6 @@
     return null;
   }
 
-  private ByteString encodeKey(SortValues sv) throws DirectoryException
-  {
-    return encodeKey(sv.getEntryID(), sv.getValues(), sv.getTypes());
-  }
-
   /**
    * Evaluate a search with sort control using this VLV index.
    *
@@ -1093,6 +1088,18 @@
   }
 
   /**
+   * Encode a VLV database key with the provided sort values.
+   *
+   * @param sv the sort values to encode
+   * @return The encoded bytes.
+   * @throws DirectoryException If a Directory Server error occurs.
+   */
+  ByteString encodeKey(SortValues sv) throws DirectoryException
+  {
+    return encodeKey(sv.getEntryID(), sv.getValues(), sv.getTypes());
+  }
+
+  /**
    * Encode a VLV database key with the given information.
    *
    * @param entryID The entry ID to encode.

--
Gitblit v1.10.0