jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1564240 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
Date Tue, 04 Feb 2014 10:10:17 GMT
Author: thomasm
Date: Tue Feb  4 10:10:16 2014
New Revision: 1564240

URL: http://svn.apache.org/r1564240
Log:
OAK-1383 Reduce memory usage of the cache

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java?rev=1564240&r1=1564239&r2=1564240&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/cache/CacheLIRS.java
Tue Feb  4 10:10:16 2014
@@ -1334,7 +1334,12 @@ public class CacheLIRS<K, V> implements 
             this.maxWeight = maxWeight;
             return this;
         }
-
+        
+        public Builder averageWeight(int averageWeight) {
+            this.averageWeight = averageWeight;
+            return this;
+        }
+        
         public Builder maximumSize(int maxSize) {
             this.maxWeight = maxSize;
             this.averageWeight = 1;
@@ -1351,7 +1356,7 @@ public class CacheLIRS<K, V> implements 
             Weigher<K, V> w = (Weigher<K, V>) weigher;
             return new CacheLIRS<K, V>(w, maxWeight, averageWeight, 16, 16, cacheLoader);
         }
-        
+
     }
 
     /**



Mime
View raw message