Class

net.liftweb.util

LRU

Related Doc: package util

Permalink

class LRU[KeyType, ValueType] extends LRUMap[KeyType, ValueType]

LRU Cache wrapping org.apache.commons.collections.map.LRUMap

Linear Supertypes
LRUMap[KeyType, ValueType], LinkedListElem[KeyType, ValueType], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LRU
  2. LRUMap
  3. LinkedListElem
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LRU(size: Int)

    Permalink
  2. new LRU(size: Int, loadFactor: Box[Float])

    Permalink

    size

    the maximum number of Elements allowed in the LRU map

    loadFactor

    the Load Factor to construct our LRU with.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def -(key: KeyType): Unit

    Permalink

    Remove the given key and its associated value from the map.

    Remove the given key and its associated value from the map.

    Definition Classes
    LRUMap
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def apply(key: KeyType): ValueType

    Permalink

    Unsafe version of get.

    Unsafe version of get.

    Definition Classes
    LRUMap
    Exceptions thrown

    NullPointerException If the key does not exist in the map. Use get instead to get a safe Box result that can be checked for existence, or use contains before calling this.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def canExpire(k: KeyType, v: ValueType): Boolean

    Permalink

    Override this method to implement a test to see if a particular element can be expired from the cache.

    Override this method to implement a test to see if a particular element can be expired from the cache.

    Attributes
    protected
    Definition Classes
    LRUMap
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def contains(key: KeyType): Boolean

    Permalink

    Check if the given key exists in the map.

    Check if the given key exists in the map. A key may not be in the map either if it was never added or if it has been expired.

    Definition Classes
    LRUMap
  10. def elements: Iterator[(KeyType, ValueType)]

    Permalink
    Definition Classes
    LRUMap
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def expired(key: KeyType, value: ValueType): Unit

    Permalink

    Called when a key/value pair is removed, before the expiredFunc.

    Called when a key/value pair is removed, before the expiredFunc.

    Does nothing by default, override for custom functionality.

    Attributes
    protected
    Definition Classes
    LRUMap
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(key: KeyType): Box[ValueType]

    Permalink

    Fetches the given key, returning Empty if the key does not exist in the map.

    Fetches the given key, returning Empty if the key does not exist in the map. A key may not be in the map either if it was never added or if it has been expired.

    Accessing a key this way will mark its value as most-recently-used.

    Definition Classes
    LRUMap
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def keys: List[KeyType]

    Permalink
    Definition Classes
    LRUMap
  20. def maxSize: Int

    Permalink
    Definition Classes
    LRUMap
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. def remove(key: KeyType): Unit

    Permalink

    Alias for -.

    Alias for -.

    Definition Classes
    LRUMap
  25. def size: Int

    Permalink
    Definition Classes
    LRUMap
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. def update(key: KeyType, value: ValueType): Unit

    Permalink

    Set the value for the given key in the map.

    Set the value for the given key in the map.

    Marks the given value as the most recently used, and, if this key is new in the map and the map has grown beyond the specifiex maxSize, evicts the least-recently-used entries.

    Definition Classes
    LRUMap
  29. def updateMaxSize(newMaxSize: Int): Unit

    Permalink

    Updates the LRUMap's current max size to newMaxSize, evicting the oldest entries if the size has shrunk.

    Updates the LRUMap's current max size to newMaxSize, evicting the oldest entries if the size has shrunk.

    Definition Classes
    LRUMap
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LRUMap[KeyType, ValueType]

Inherited from LinkedListElem[KeyType, ValueType]

Inherited from AnyRef

Inherited from Any

Ungrouped