directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r763080 - in /directory/apacheds/branches/ldif-partition: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
Date Wed, 08 Apr 2009 01:47:18 GMT
Author: akarasulu
Date: Wed Apr  8 01:47:17 2009
New Revision: 763080

URL: http://svn.apache.org/viewvc?rev=763080&view=rev
Log:
removing impl specific cacheSize property from XdbmPartition

Modified:
    directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java
    directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java

Modified: directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java?rev=763080&r1=763079&r2=763080&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java
(original)
+++ directory/apacheds/branches/ldif-partition/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/jdbm/JdbmPartition.java
Wed Apr  8 01:47:17 2009
@@ -69,7 +69,9 @@
     private JdbmStore<ServerEntry> store;
     private boolean optimizerEnabled = true;
     private Set<JdbmIndex<?,ServerEntry>> indexedAttributes;
-
+    private int cacheSize;
+    private String suffix;
+    
     
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
@@ -93,13 +95,31 @@
 
     public String getSuffix()
     {
-        return super.suffix;
+        return suffix;
     }
 
 
     public void setSuffix( String suffix )
     {
-        super.suffix = suffix;
+        this.suffix = suffix;
+    }
+
+
+    /**
+     * @param cacheSize the cacheSize to set
+     */
+    public void setCacheSize( int cacheSize )
+    {
+        this.cacheSize = cacheSize;
+    }
+
+
+    /**
+     * @return the cacheSize
+     */
+    public int getCacheSize()
+    {
+        return cacheSize;
     }
 
 
@@ -181,10 +201,10 @@
         searchEngine = new DefaultSearchEngine( store, cursorBuilder, evaluatorBuilder, optimizer
);
         
         // initialize the store
-        store.setCacheSize( cacheSize );
-        store.setName( id );
+        store.setCacheSize( getCacheSize() );
+        store.setName( getId() );
         store.setSuffixDn( suffix );
-        store.setWorkingDirectory( new File( directoryService.getWorkingDirectory().getPath()
+ File.separator + id ) );
+        store.setWorkingDirectory( new File( directoryService.getWorkingDirectory().getPath()
+ File.separator + getId() ) );
 
         Set<JdbmIndex<?,ServerEntry>> userIndices = new HashSet<JdbmIndex<?,ServerEntry>>();
         
@@ -601,6 +621,6 @@
      */
     public String toString()
     {
-        return "Partition<" + id + ">"; 
+        return "Partition<" + getId() + ">"; 
     }
 }

Modified: directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java?rev=763080&r1=763079&r2=763080&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-base/src/main/java/org/apache/directory/server/xdbm/XdbmPartition.java
Wed Apr  8 01:47:17 2009
@@ -82,18 +82,8 @@
 
     protected Registries registries;
 
-    protected String id;
-    protected int cacheSize = -1;
-    protected LdapDN suffixDn;
-    protected String suffix;
-    
-    /** The rootDSE context */
-    protected ServerEntry contextEntry;
-
+    private String id;
 
-    // ------------------------------------------------------------------------
-    // C O N S T R U C T O R S
-    // ------------------------------------------------------------------------
 
 
     /**
@@ -104,35 +94,6 @@
     }
 
     
-    // ------------------------------------------------------------------------
-    // C O N F I G U R A T I O N   M E T H O D S
-    // ------------------------------------------------------------------------
-
-
-    /**
-     * Used to specify the entry cache size for a Partition.  Various Partition
-     * implementations may interpret this value in different ways: i.e. total cache
-     * size limit verses the number of entries to cache.
-     *
-     * @param cacheSize the maximum size of the cache in the number of entries
-     */
-    public void setCacheSize( int cacheSize )
-    {
-        this.cacheSize = cacheSize;
-    }
-
-
-    /**
-     * Gets the entry cache size for this BTreePartition.
-     *
-     * @return the maximum size of the cache as the number of entries maximum before paging
out
-     */
-    public int getCacheSize()
-    {
-        return cacheSize;
-    }
-
-
     /**
      * Gets the unique identifier for this partition.
      *
@@ -155,9 +116,9 @@
     }
     
     
-    // -----------------------------------------------------------------------
-    // E N D   C O N F I G U R A T I O N   M E T H O D S
-    // -----------------------------------------------------------------------
+    // ------------------------------------------------------------------------
+    // Public methods - not declared in any interfaces just for this class
+    // ------------------------------------------------------------------------
 
 
     /**
@@ -173,10 +134,6 @@
     public abstract void setRegistries( Registries registries ) throws Exception;
 
     
-    // ------------------------------------------------------------------------
-    // Public Accessors - not declared in any interfaces just for this class
-    // ------------------------------------------------------------------------
-
     /**
      * Gets the DefaultSearchEngine used by this ContextPartition to search the
      * Database. 



Mime
View raw message