directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1005448 - in /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl: AllEntriesCursor.java SubtreeScopeCursor.java
Date Thu, 07 Oct 2010 13:56:03 GMT
Author: kayyagari
Date: Thu Oct  7 13:56:03 2010
New Revision: 1005448

URL: http://svn.apache.org/viewvc?rev=1005448&view=rev
Log:
o closing the wrapped cursors

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java?rev=1005448&r1=1005447&r2=1005448&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
Thu Oct  7 13:56:03 2010
@@ -176,4 +176,20 @@ public class AllEntriesCursor<ID extends
         checkNotClosed( "previous()" );
         return wrapped.previous();
     }
+
+
+    @Override
+    public void close() throws Exception
+    {
+        wrapped.close();
+        super.close();
+    }
+
+
+    @Override
+    public void close( Exception cause ) throws Exception
+    {
+        wrapped.close();
+        super.close( cause );
+    }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java?rev=1005448&r1=1005447&r2=1005448&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
Thu Oct  7 13:56:03 2010
@@ -336,4 +336,34 @@ public class SubtreeScopeCursor<ID exten
     {
         return scopeCursor.isElementReused() || ( dereferencedCursor != null && dereferencedCursor.isElementReused()
);
     }
+
+
+    private void closeCursors() throws Exception
+    {
+        if( dereferencedCursor != null )
+        {
+            dereferencedCursor.close();
+        }
+        
+        if( scopeCursor != null )
+        {
+            scopeCursor.close();
+        }
+    }
+    
+    
+    @Override
+    public void close() throws Exception
+    {
+        closeCursors();
+        super.close();
+    }
+
+
+    @Override
+    public void close( Exception cause ) throws Exception
+    {
+        closeCursors();
+        super.close( cause );
+    }
 }



Mime
View raw message