directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1050642 - in /directory/apacheds/branches/apacheds-AP: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/test/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/
Date Sat, 18 Dec 2010 14:52:44 GMT
Author: elecharny
Date: Sat Dec 18 14:52:44 2010
New Revision: 1050642

URL: http://svn.apache.org/viewvc?rev=1050642&view=rev
Log:
Added the SeqNumber generator

Modified:
    directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
    directory/apacheds/branches/apacheds-AP/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
    directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java

Modified: directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java?rev=1050642&r1=1050641&r2=1050642&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-api/src/main/java/org/apache/directory/server/core/DirectoryService.java
Sat Dec 18 14:52:44 2010
@@ -584,4 +584,21 @@ public interface DirectoryService extend
      * @return the DN factory
      */
     DNFactory getDNFactory();
+
+    
+    /**
+     * Get a new sequence number. The counter will be incremented when this method
+     * is called, even if we don't use the number.
+     * 
+     * @return the apSeqNumber
+     */
+    public long getNewApSeqNumber();
+
+    
+    /**
+     * Get the last created sequence number.
+     * 
+     * @return the apSeqNumber, or -1 if no AP sequence number has been created
+     */
+    public long getApSeqNumber();
 }

Modified: directory/apacheds/branches/apacheds-AP/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java?rev=1050642&r1=1050641&r2=1050642&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core-api/src/test/java/org/apache/directory/server/core/MockDirectoryService.java
Sat Dec 18 14:52:44 2010
@@ -561,4 +561,22 @@ public class MockDirectoryService implem
     {
         return null;
     }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public long getNewApSeqNumber()
+    {
+        return -1L;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public long getApSeqNumber()
+    {
+        return -1L;
+    }
 }

Modified: directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=1050642&r1=1050641&r2=1050642&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/branches/apacheds-AP/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Sat Dec 18 14:52:44 2010
@@ -1971,13 +1971,19 @@ public class DefaultDirectoryService imp
 
 
     /**
-     * Get a new sequence number. The counter will be incremented when this method
-     * is called, even if we don't use the number.
-     * @return the apSeqNumber
+     * {@inheritDoc}
      */
-    public long getApSeqNumber()
+    public long getNewApSeqNumber()
     {
         return apSeqNumber.getAndIncrement();
     }
 
+
+    /**
+     * {@inheritDoc}
+     */
+    public long getApSeqNumber()
+    {
+        return apSeqNumber.get();
+    }
 }
\ No newline at end of file



Mime
View raw message