class LRU[KeyType, ValueType] extends LRUMap[KeyType, ValueType]
LRU Cache wrapping org.apache.commons.collections.map.LRUMap
- Alphabetic
- By Inheritance
- LRU
- LRUMap
- LinkedListElem
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
-(key: KeyType): Unit
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
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(key: KeyType): ValueType
Unsafe version of
get
. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canExpire(k: KeyType, v: ValueType): Boolean
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
contains(key: KeyType): Boolean
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
-
def
elements: Iterator[(KeyType, ValueType)]
- Definition Classes
- LRUMap
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
expired(key: KeyType, value: ValueType): Unit
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
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(key: KeyType): Box[ValueType]
Fetches the given key, returning
Empty
if the key does not exist in the map. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
keys: List[KeyType]
- Definition Classes
- LRUMap
-
def
maxSize: Int
- Definition Classes
- LRUMap
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
remove(key: KeyType): Unit
Alias for
-
. -
def
size: Int
- Definition Classes
- LRUMap
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
update(key: KeyType, value: ValueType): Unit
Set the
value
for the givenkey
in the map. -
def
updateMaxSize(newMaxSize: Int): Unit
Updates the
LRUMap
's current max size tonewMaxSize
, evicting the oldest entries if the size has shrunk.Updates the
LRUMap
's current max size tonewMaxSize
, evicting the oldest entries if the size has shrunk.- Definition Classes
- LRUMap
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )