|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.cohesion.bssh.impl.util.Cache<K,E>
public class Cache<K,E>
A cache implementation.
On a saturated cache miss the lowest element according to the given Comparator is replaced.
Nested Class Summary | |
---|---|
static class |
Cache.ReplacementStrategy
|
Constructor Summary | |
---|---|
Cache(int capacity,
Factory<K,E> factory,
java.util.Comparator<? super CacheEntry<K,E>> sorter)
|
Method Summary | |
---|---|
E |
get(K key)
|
void |
invalidate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cache(int capacity, Factory<K,E> factory, java.util.Comparator<? super CacheEntry<K,E>> sorter)
Method Detail |
---|
public E get(K key) throws java.lang.InstantiationException
java.lang.InstantiationException
public void invalidate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |