directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r556092 - in /directory/apacheds/trunk: core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/directory/server/core/configuration/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/s...
Date Fri, 13 Jul 2007 18:30:18 GMT
Author: akarasulu
Date: Fri Jul 13 11:30:17 2007
New Revision: 556092

URL: http://svn.apache.org/viewvc?view=rev&rev=556092
Log:
fixing coupling issue between partition configuration objects

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=556092&r1=556091&r2=556092
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Fri Jul 13 11:30:17 2007
@@ -861,7 +861,6 @@
         }
         
         schemaPartitionConfig.setIndexedAttributes( listing.getIndexedAttributes() );
-        schemaPartitionConfig.setOptimizerEnabled( true );
         schemaPartitionConfig.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java?view=diff&rev=556092&r1=556091&r2=556092
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/MutablePartitionConfiguration.java
Fri Jul 13 11:30:17 2007
@@ -26,7 +26,6 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.core.partition.Partition;
-import org.apache.directory.server.core.partition.impl.btree.BTreePartitionConfiguration;
 
 
 /**
@@ -35,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class MutablePartitionConfiguration extends BTreePartitionConfiguration
+public class MutablePartitionConfiguration extends PartitionConfiguration
 {
     /**
      * Creates a new instance.
@@ -74,11 +73,6 @@
         super.setSuffix( suffix );
     }
     
-    
-    public void setOptimizerEnabled( boolean optimizerEnabled )
-    {
-        super.setOptimizerEnabled( optimizerEnabled );
-    }
     
     /**
      * Get's the entry cache size for this partition.

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=556092&r1=556091&r2=556092
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Fri Jul 13 11:30:17 2007
@@ -65,7 +65,7 @@
 
     /** the search engine used to search the database */
     private SearchEngine searchEngine = null;
-    private Optimizer optimizer = new NoOpOptimizer();
+    private Optimizer optimizer;
     
     protected AttributeTypeRegistry attributeTypeRegistry = null;
     protected OidRegistry oidRegistry = null;
@@ -342,10 +342,18 @@
     {
         if ( cfg instanceof BTreePartitionConfiguration )
         {
-            if ( ( ( BTreePartitionConfiguration ) cfg ).isOptimizerEnabled() )
+            if ( ! ( ( BTreePartitionConfiguration ) cfg ).isOptimizerEnabled() )
+            {
+                optimizer = new NoOpOptimizer();
+            }
+            else
             {
                 optimizer = new DefaultOptimizer( this );
             }
+        }
+        else
+        {
+            optimizer = new DefaultOptimizer( this );
         }
     }
 

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?view=diff&rev=556092&r1=556091&r2=556092
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
(original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
Fri Jul 13 11:30:17 2007
@@ -134,7 +134,6 @@
         pc.setName( "schema" );
         pc.setCacheSize( 1000 );
         pc.setIndexedAttributes( extractor.getDbFileListing().getIndexedAttributes() );
-        pc.setOptimizerEnabled( true );
         pc.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();

Modified: directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java?view=diff&rev=556092&r1=556091&r2=556092
==============================================================================
--- directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
(original)
+++ directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java
Fri Jul 13 11:30:17 2007
@@ -222,7 +222,6 @@
         }
         
         schemaPartitionConfig.setIndexedAttributes( listing.getIndexedAttributes() );
-        schemaPartitionConfig.setOptimizerEnabled( true );
         schemaPartitionConfig.setSuffix( "ou=schema" );
         
         Attributes entry = new AttributesImpl();



Mime
View raw message