directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 10161 - incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions
Date Thu, 22 Apr 2004 02:04:06 GMT
Author: akarasulu
Date: Wed Apr 21 19:04:05 2004
New Revision: 10161

Modified:
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/BitPermissionIndexManager.java
   incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/JeBitPermissionIndexManager.java
Log:
 o added method to automatically find and claim an index in one call


Modified: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/BitPermissionIndexManager.java
==============================================================================
--- incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/BitPermissionIndexManager.java
(original)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/BitPermissionIndexManager.java
Wed Apr 21 19:04:05 2004
@@ -63,4 +63,13 @@
      * @throws RmsException if there are failures accessing the backing store
      */
     void claimIndex( String appName, int index ) throws RmsException ;
+
+    /**
+     * Automatically claims the lowest available index for an application.
+     *
+     * @param appName the name of the application to claim the index for
+     * @return the next lowest index claimed
+     * @throws RmsException if there are failures accessing the backing store
+     */
+    int claimIndex( String appName ) throws RmsException ;
 }

Modified: incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/JeBitPermissionIndexManager.java
==============================================================================
--- incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/JeBitPermissionIndexManager.java
(original)
+++ incubator/directory/rms/trunk/je/src/java/org/apache/rms/je/permissions/JeBitPermissionIndexManager.java
Wed Apr 21 19:04:05 2004
@@ -125,4 +125,20 @@
     {
         dao.put( appName, index ) ;
     }
+
+
+    /**
+     * Automatically claims the lowest available index for an application.
+     *
+     * @param appName the name of the application to claim the index for
+     * @return the next lowest index claimed
+     * @throws org.apache.rms.RmsException if there are failures accessing the
+     * backing store
+     */
+    public int claimIndex( String appName ) throws RmsException
+    {
+        int index = getMinFreeIndex( appName ) ;
+        claimIndex( appName, index ) ;
+        return index ;
+    }
 }

Mime
View raw message