directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1485983 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/api/partition/ jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-partition/src/main/java/org/apache...
Date Fri, 24 May 2013 09:23:23 GMT
Author: elecharny
Date: Fri May 24 09:23:22 2013
New Revision: 1485983

URL: http://svn.apache.org/r1485983
Log:
Move some protected members to private, added the accessors.

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    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/core/partition/impl/btree/AbstractBTreePartition.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java?rev=1485983&r1=1485982&r2=1485983&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/partition/Partition.java
Fri May 24 09:23:22 2013
@@ -281,8 +281,8 @@ public interface Partition
      * @throws IOException if we can't write the data
      */
     void dumpIndex( OutputStream stream, String name ) throws IOException;
-    
-    
+
+
     /**
      * set the Cache service 
      *

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=1485983&r1=1485982&r2=1485983&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Fri May 24 09:23:22 2013
@@ -130,17 +130,17 @@ public class JdbmPartition extends Abstr
             // setup optimizer and registries for parent
             if ( !optimizerEnabled )
             {
-                optimizer = new NoOpOptimizer();
+                setOptimizer( new NoOpOptimizer() );
             }
             else
             {
-                optimizer = new DefaultOptimizer<Entry>( this );
+                setOptimizer( new DefaultOptimizer<Entry>( this ) );
             }
 
             EvaluatorBuilder evaluatorBuilder = new EvaluatorBuilder( this, schemaManager
);
             CursorBuilder cursorBuilder = new CursorBuilder( this, evaluatorBuilder );
 
-            searchEngine = new DefaultSearchEngine( this, cursorBuilder, evaluatorBuilder,
optimizer );
+            setSearchEngine( new DefaultSearchEngine( this, cursorBuilder, evaluatorBuilder,
getOptimizer() ) );
 
             // Create the underlying directories (only if needed)
             File partitionDir = new File( getPartitionPath() );

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=1485983&r1=1485982&r2=1485983&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
Fri May 24 09:23:22 2013
@@ -74,14 +74,14 @@ public class AvlPartition extends Abstra
             // setup optimizer and registries for parent
             if ( !optimizerEnabled )
             {
-                optimizer = new NoOpOptimizer();
+                setOptimizer( new NoOpOptimizer() );
             }
             else
             {
-                optimizer = new DefaultOptimizer<Entry>( this );
+                setOptimizer( new DefaultOptimizer<Entry>( this ) );
             }
 
-            searchEngine = new DefaultSearchEngine( this, cursorBuilder, evaluatorBuilder,
optimizer );
+            setSearchEngine( new DefaultSearchEngine( this, cursorBuilder, evaluatorBuilder,
getOptimizer() ) );
 
             if ( isInitialized() )
             {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1485983&r1=1485982&r2=1485983&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
Fri May 24 09:23:22 2013
@@ -100,10 +100,10 @@ public abstract class AbstractBTreeParti
     private static final Logger LOG = LoggerFactory.getLogger( AbstractBTreePartition.class
);
 
     /** the search engine used to search the database */
-    protected SearchEngine searchEngine;
+    private SearchEngine searchEngine;
 
     /** The optimizer to use during search operation */
-    protected Optimizer optimizer;
+    private Optimizer optimizer;
 
     /** Tells if the Optimizer is enabled */
     protected boolean optimizerEnabled = true;
@@ -2892,4 +2892,31 @@ public abstract class AbstractBTreeParti
     public void addToCache( String id, Entry entry )
     {
     }
+
+
+    /**
+     * @return the optimizer
+     */
+    public Optimizer getOptimizer()
+    {
+        return optimizer;
+    }
+
+
+    /**
+     * @param optimizer the optimizer to set
+     */
+    public void setOptimizer( Optimizer optimizer )
+    {
+        this.optimizer = optimizer;
+    }
+
+
+    /**
+     * @param searchEngine the searchEngine to set
+     */
+    public void setSearchEngine( SearchEngine searchEngine )
+    {
+        this.searchEngine = searchEngine;
+    }
 }



Mime
View raw message