directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r998496 - in /directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server: core/partition/impl/avl/AvlPartition.java xdbm/impl/avl/AvlIndex.java xdbm/impl/avl/AvlStore.java xdbm/impl/avl/AvlTable.java
Date Sat, 18 Sep 2010 16:51:58 GMT
Author: kayyagari
Date: Sat Sep 18 16:51:58 2010
New Revision: 998496

URL: http://svn.apache.org/viewvc?rev=998496&view=rev
Log:
o implemented the destroy() methods

Modified:
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java?rev=998496&r1=998495&r2=998496&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/avl/AvlPartition.java
Sat Sep 18 16:51:58 2010
@@ -131,4 +131,11 @@ public class AvlPartition extends Abstra
         return ( org.apache.directory.server.xdbm.impl.avl.AvlStore<Entry> ) store;
     }
 
+
+    @Override
+    protected void doDestroy() throws Exception
+    {
+        store.destroy();        
+    }
+
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java?rev=998496&r1=998495&r2=998496&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlIndex.java
Sat Sep 18 16:51:58 2010
@@ -123,8 +123,15 @@ public class AvlIndex<K, O> implements I
      */
     public void close() throws Exception
     {
-        forward.close();
-        reverse.close();
+        if ( forward != null )
+        {
+            forward.close();
+        }
+        
+        if ( reverse != null )
+        {
+            reverse.close();
+        }
     }
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java?rev=998496&r1=998495&r2=998496&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlStore.java
Sat Sep 18 16:51:58 2010
@@ -53,7 +53,22 @@ public class AvlStore<E> extends Abstrac
     public void destroy() throws Exception
     {
         // don't reset initialized flag
-        //initialized = false;
+        initialized = false;
+
+        if ( master != null )
+        {
+            master.close();
+        }
+        
+        for ( Index idx : systemIndices.values() )
+        {
+            idx.close();
+        }
+        
+        for ( Index idx : userIndices.values() )
+        {
+            idx.close();
+        }
     }
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java?rev=998496&r1=998495&r2=998496&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/impl/avl/AvlTable.java
Sat Sep 18 16:51:58 2010
@@ -70,12 +70,11 @@ public class AvlTable<K, V> implements T
     
 
     /**
-     * Does nothing.
-     * 
      * {@inheritDoc}
      */
     public void close() throws Exception
     {
+        ( ( AvlTreeMapImpl ) avl ).removeAll();
     }
 
     



Mime
View raw message