|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.odysseus.el.tree.impl.Cache
public final class Cache
Simple (thread-safe) LRU cache. After the cache size reached a certain limit, the least recently used entry is removed, when adding a new entry.
Constructor Summary | |
---|---|
Cache(int size)
Constructor. |
|
Cache(int size,
java.util.Map<java.lang.String,Tree> secondary)
Constructor. |
Method Summary | |
---|---|
Tree |
get(java.lang.String expression)
Lookup tree |
void |
put(java.lang.String expression,
Tree tree)
Cache tree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cache(int size)
WeakHashMap
as secondary map.
size
- maximum primary cache sizepublic Cache(int size, java.util.Map<java.lang.String,Tree> secondary)
size
- maximum primary cache sizesecondary
- the secondary map (may be null
)Method Detail |
---|
public Tree get(java.lang.String expression)
TreeCache
get
in interface TreeCache
public void put(java.lang.String expression, Tree tree)
TreeCache
put
in interface TreeCache
|
Copyright © 2006-2009 Odysseus Software GmbH. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |