From 5c3196a7dc35588f22aa086e4e5cf6a563ec0de0 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Wed, 08 Nov 2006 20:19:03 +0000
Subject: [PATCH] This fix removes the static nextId property as well as the getters and setters for it out of the EntryID class. The nextId property is now a non static property in the RootContainer class. Each RootContainer is responsible for keeping track of the next ID and assigning new entry IDs to all entries in its EntryContainers. 

---
 opends/src/server/org/opends/server/backends/jeb/EntryID.java |   43 -------------------------------------------
 1 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryID.java b/opends/src/server/org/opends/server/backends/jeb/EntryID.java
index 5d5c99d..95ab922 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryID.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryID.java
@@ -28,8 +28,6 @@
 
 import com.sleepycat.je.DatabaseEntry;
 
-import java.util.concurrent.atomic.AtomicLong;
-
 /**
  * An integer identifier assigned to each entry in the JE backend.
  * An entry ID is implemented by this class as a long.
@@ -39,11 +37,6 @@
 public class EntryID implements Comparable<EntryID>
 {
   /**
-   * The cached value of the next identifier to be assigned.
-   */
-  private static AtomicLong nextid = new AtomicLong(1);
-
-  /**
    * The identifier integer value.
    */
   private final Long id;
@@ -105,42 +98,6 @@
   }
 
   /**
-   * Initialize the next ID counter from the previous highest value.
-   * @param highestID The previous highest entry ID.
-   */
-  public static void initialize(EntryID highestID)
-  {
-    nextid = new AtomicLong(highestID.id + 1);
-  }
-
-  /**
-   * Assign the next entry ID.
-   * @return The assigned entry ID.
-   */
-  public static EntryID assignNext()
-  {
-    return new EntryID(nextid.getAndIncrement());
-  }
-
-  /**
-   * Return the lowest entry ID assigned.
-   * @return The lowest entry ID assigned.
-   */
-  public static Long getLowest()
-  {
-    return 1L;
-  }
-
-  /**
-   * Return the highest entry ID assigned.
-   * @return The highest entry ID assigned.
-   */
-  public static Long getHighest()
-  {
-    return (nextid.get() - 1);
-  }
-
-  /**
    * Compares this object with the specified object for order.  Returns a
    * negative integer, zero, or a positive integer as this object is less
    * than, equal to, or greater than the specified object.<p>

--
Gitblit v1.10.0