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

---
 opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
index e5058a5..8661d84 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -153,7 +153,7 @@
       try
       {
         //Try creating all the indexes before confirming they are valid ones.
-        new AttributeIndex(cfg, state, env, EntryContainer.this);
+        new AttributeIndex(cfg, EntryContainer.this);
         return true;
       }
       catch(Exception e)
@@ -172,8 +172,7 @@
 
       try
       {
-        AttributeIndex index =
-          new AttributeIndex(cfg, state, env, EntryContainer.this);
+        AttributeIndex index = new AttributeIndex(cfg, EntryContainer.this);
         index.open();
         if(!index.isTrusted())
         {
@@ -474,8 +473,7 @@
       {
         LocalDBIndexCfg indexCfg = config.getLocalDBIndex(idx);
 
-        AttributeIndex index =
-          new AttributeIndex(indexCfg, state, env, this);
+        AttributeIndex index = new AttributeIndex(indexCfg, this);
         index.open();
         if(!index.isTrusted())
         {
@@ -3355,6 +3353,20 @@
     return index;
   }
 
+  /**
+   * Creates a new index for an attribute.
+   *
+   * @param indexName the name to give to the new index
+   * @param indexer the indexer to use when inserting data into the index
+   * @param indexEntryLimit the index entry limit
+   * @return a new index
+   */
+  Index newIndexForAttribute(String indexName, Indexer indexer, int indexEntryLimit)
+  {
+    final int cursorEntryLimit = 100000;
+    return new Index(indexName, indexer, state, indexEntryLimit, cursorEntryLimit, false, env, this);
+  }
+
 
   /**
    * Checks if any modifications apply to this indexed attribute.

--
Gitblit v1.10.0