From a465378dd21226dd26665300c5aadb1eedef5caa Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 11 Mar 2015 13:37:19 +0000
Subject: [PATCH] OPENDJ-1708 Persistit: no rebuild-index support
---
opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ImportIDSet.java | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ImportIDSet.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ImportIDSet.java
index f3591f8..f909237 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ImportIDSet.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/jeb/ImportIDSet.java
@@ -67,13 +67,6 @@
this.doCount = doCount;
}
- /** Create an empty import instance. */
- public ImportIDSet()
- {
- this.limit = -1;
- this.doCount = false;
- }
-
/**
* Clear the set so it can be reused again. The boolean indexParam specifies
* if the index parameters should be cleared also.
@@ -113,16 +106,16 @@
/**
* Add the specified long value to an import ID set.
*
- * @param l The long value to add to an import ID set.
+ * @param entryID The long value to add to an import ID set.
*/
- void addEntryID(long l) {
+ void addEntryID(long entryID) {
if(!isDefined()) {
if(doCount) {
undefinedSize++;
}
return;
}
- if (l < 0 || (isDefined() && count + 1 > limit))
+ if (entryID < 0 || (isDefined() && count + 1 > limit))
{
setUndefined();
if(doCount) {
@@ -132,7 +125,7 @@
}
count = 0;
} else {
- add(l);
+ add(entryID);
}
}
@@ -346,17 +339,17 @@
return count;
}
- private boolean add(long v)
+ private boolean add(long entryID)
{
resize(count+1);
- if (count == 0 || v > array[count-1])
+ if (count == 0 || entryID > array[count-1])
{
- array[count++] = v;
+ array[count++] = entryID;
return true;
}
- int pos = binarySearch(array, count, v);
+ int pos = binarySearch(array, count, entryID);
if (pos >=0)
{
return false;
@@ -368,7 +361,7 @@
pos = -(pos+1);
System.arraycopy(array, pos, array, pos+1, count-pos);
- array[pos] = v;
+ array[pos] = entryID;
count++;
return true;
}
--
Gitblit v1.10.0