From 31d794be59cb2d1bf264df79f471b0c8d5f5a457 Mon Sep 17 00:00:00 2001 From: lresende Date: Sat, 21 Nov 2009 07:40:26 +0000 Subject: Moving to site trunk git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882841 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/databinding/util/LRUCache.html | 447 +++++++++++++++++++++ 1 file changed, 447 insertions(+) create mode 100644 site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/databinding/util/LRUCache.html (limited to 'site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/databinding/util/LRUCache.html') diff --git a/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/databinding/util/LRUCache.html b/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/databinding/util/LRUCache.html new file mode 100644 index 0000000000..d22ed5d7bf --- /dev/null +++ b/site/trunk/site-publish/doc/javadoc/java-sca-1.4/org/apache/tuscany/sca/databinding/util/LRUCache.html @@ -0,0 +1,447 @@ + + + + + + +LRUCache + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.tuscany.sca.databinding.util +
+Class LRUCache<K,V>

+
+java.lang.Object
+  extended by java.util.AbstractMap<K,V>
+      extended by java.util.HashMap<K,V>
+          extended by java.util.LinkedHashMap<K,V>
+              extended by org.apache.tuscany.sca.databinding.util.LRUCache<K,V>
+
+
+
Type Parameters:
K -
V -
+
+
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,V>
+
+
+
+
public class LRUCache<K,V>
extends java.util.LinkedHashMap<K,V>
+ + +

+A Simple LRU Cache +

+ +

+

+
See Also:
Serialized Form
+
+ +

+ + + + + + + +
+Nested Class Summary
+ + + + + + + +
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
+  + + + + + + + + + + + +
+Field Summary
+protected  intmaxCacheSize + +
+           
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
LRUCache() + +
+          Default constructor for an LRU Cache The default capacity is 10000
LRUCache(int maximumCacheSize) + +
+          Constructs a LRUCache with a maximum capacity
LRUCache(int initialCapacity, + int maximumCacheSize, + float loadFactor, + boolean accessOrder) + +
+          Constructs an empty LRUCache instance with the specified + initial capacity, maximumCacheSize,load factor and ordering mode.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intgetMaxCacheSize() + +
+           
+protected  booleanremoveEldestEntry(java.util.Map.Entry<K,V> eldest) + +
+           
+ voidsetMaxCacheSize(int maxCacheSize) + +
+           
+ + + + + + + +
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
+ + + + + + + +
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
+ + + + + + + +
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
+ + + + + + + +
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
+  +

+ + + + + + + + +
+Field Detail
+ +

+maxCacheSize

+
+protected int maxCacheSize
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+LRUCache

+
+public LRUCache()
+
+
Default constructor for an LRU Cache The default capacity is 10000 +

+

+
+ +

+LRUCache

+
+public LRUCache(int maximumCacheSize)
+
+
Constructs a LRUCache with a maximum capacity +

+

+
Parameters:
maximumCacheSize -
+
+
+ +

+LRUCache

+
+public LRUCache(int initialCapacity,
+                int maximumCacheSize,
+                float loadFactor,
+                boolean accessOrder)
+
+
Constructs an empty LRUCache instance with the specified + initial capacity, maximumCacheSize,load factor and ordering mode. +

+

+
Parameters:
initialCapacity - the initial capacity.
maximumCacheSize -
loadFactor - the load factor.
accessOrder - the ordering mode - true for access-order, + false for insertion-order. +
Throws: +
java.lang.IllegalArgumentException - if the initial capacity is negative or + the load factor is non-positive.
+
+ + + + + + + + +
+Method Detail
+ +

+getMaxCacheSize

+
+public int getMaxCacheSize()
+
+
+ +
Returns:
Returns the maxCacheSize.
+
+
+
+ +

+setMaxCacheSize

+
+public void setMaxCacheSize(int maxCacheSize)
+
+
+
Parameters:
maxCacheSize - The maxCacheSize to set.
+
+
+
+ +

+removeEldestEntry

+
+protected boolean removeEldestEntry(java.util.Map.Entry<K,V> eldest)
+
+
+
Overrides:
removeEldestEntry in class java.util.LinkedHashMap<K,V>
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3