Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.util
Class LRUCache

    java.lang.Object
      java.util.AbstractMap
          java.util.HashMap
              java.util.LinkedHashMap
                  org.codehaus.activemq.util.LRUCache

All Implemented Interfaces:
  java.lang.Cloneable, java.util.Map, java.io.Serializable

public class LRUCache
extends java.util.LinkedHashMap

Represnts an LRUCache of a fixed maximum size which by default will remove items based on access order but can be used to use insertion order

Version:
  $Revision: 1.1 $
See Also:
  Serialized Form

Nested Class Summary

Nested classes inherited from class java.util.LinkedHashMap
``

Nested classes inherited from class java.util.AbstractMap
``

Field Summary
`protected static int` | `DEFAULT_INITIAL_CAPACITY`
`protected static float` | `DEFAULT_LOAD_FACTOR`

Fields inherited from class java.util.HashMap
``

Fields inherited from class java.util.AbstractMap
``

Constructor Summary
`LRUCache(int maxSize)`
`LRUCache(int maxSize, boolean accessOrder)`
`LRUCache(int initialCapacity, float loadFactor, boolean accessOrder, int maxSize)`

Method Summary
`protected boolean` | `removeEldestEntry(java.util.Map.Entry eldest)`

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
`equals, hashCode`

Field Detail

### DEFAULT_INITIAL_CAPACITY

    protected static final int DEFAULT_INITIAL_CAPACITY

See Also:
  Constant Field Values

### DEFAULT_LOAD_FACTOR

    protected static final float DEFAULT_LOAD_FACTOR

See Also:
  Constant Field Values

Constructor Detail

### LRUCache

    public LRUCache(int initialCapacity,
                    float loadFactor,
                    boolean accessOrder,
                    int maxSize)

### LRUCache

    public LRUCache(int maxSize)

### LRUCache

    public LRUCache(int maxSize,
                    boolean accessOrder)

Method Detail

### removeEldestEntry

    protected boolean removeEldestEntry(java.util.Map.Entry eldest)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.