directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1515899 - /directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Date Tue, 20 Aug 2013 17:42:35 GMT
Author: elecharny
Date: Tue Aug 20 17:42:35 2013
New Revision: 1515899

URL: http://svn.apache.org/r1515899
Log:
Make the cache configurable, instead of using a default configuration

Modified:
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=1515899&r1=1515898&r2=1515899&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Tue Aug 20 17:42:35 2013
@@ -163,7 +163,8 @@ public class JdbmIndex<K, V> extends Abs
         TransactionManager transactionManager = base.getTransactionManager();
         transactionManager.setMaximumTransactionsInLog( 2000 );
 
-        recMan = new CacheRecordManager( base, new MRU( DEFAULT_INDEX_CACHE_SIZE ) );
+        int realCacheSize = Math.max( cacheSize, DEFAULT_INDEX_CACHE_SIZE );
+        recMan = new CacheRecordManager( base, new MRU( realCacheSize ) );
 
         try
         {



Mime
View raw message