Author: thomasm
Date: Wed Nov 23 07:20:21 2016
New Revision: 1770924

URL: http://svn.apache.org/viewvc?rev=1770924&view=rev
Log:
OAK-301 LIRS stackMoveDistance documentation

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=1770924&r1=1770923&r2=1770924&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
 Wed Nov 23 07:20:21 2016
@@ -1595,6 +1595,15 @@ public class CacheLIRS<K, V> implements
             return this;
         }
 
+        /**
+         * How many other item are to be moved to the top of the stack before
+         * the current item is moved. The default is 16. Using higher values
+         * will avoid re-ordering in many cases, so less time is spent
+         * reordering. But this somewhat reduces cache hit rate, and eviction
+         * will become more random. Typically, cache hit rate can be improved 
by
+         * using smaller values, and access performance can be improved using
+         * larger values. Using values larger than 128 is not recommended.
+         */
         public Builder<K, V> stackMoveDistance(int stackMoveDistance) {
             if (stackMoveDistance < 0) {
                 LOG.warn("Illegal stack move distance: " + stackMoveDistance + 
", using 16");


Reply via email to