|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.enterprise.cache.DefaultCache
A cache implementation, where the entries are kept in a HashMap. Moreover, each entry is also inserted in two doubly linked list. One specifies the insertion and the other the access-order.
| Nested Class Summary |
| Nested classes inherited from class at.spardat.enterprise.cache.ICache |
ICache.IKeyFilter |
| Constructor Summary | |
DefaultCache(ICacheDescriptor descriptor)
Constructs a Cache and takes the caching behaviour from the provided descriptor. |
|
| Method Summary | |
void |
checkInvariant()
The public synchronized version of consistency checking |
void |
insert(java.lang.Object key,
java.lang.Object value)
Inserts an object for a particular key in the cache. |
java.lang.Object |
lookup(java.lang.Object key)
Looks up the cache for a particular key. |
static void |
main(java.lang.String[] args)
|
void |
print()
outputs the cache content and access statistics |
void |
printStatistics()
Outputs statistics of cache usage to System.out. |
void |
remove(java.lang.Object key)
Removes a cached object for a particular key. |
void |
removeAll()
Removes all cached objects in this cache. |
void |
removeAllHaving(ICache.IKeyFilter f)
For every key in the cache, method f.accept() is called. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultCache(ICacheDescriptor descriptor)
| Method Detail |
public java.lang.Object lookup(java.lang.Object key)
ICache
lookup in interface ICacheICache.lookup(Object)public void remove(java.lang.Object key)
ICache
remove in interface ICacheICache.remove(Object)public void removeAll()
ICache
removeAll in interface ICacheICache.removeAll()public void removeAllHaving(ICache.IKeyFilter f)
ICache
removeAllHaving in interface ICachef - filter that qualifies keys.ICache.removeAllHaving(at.spardat.enterprise.cache.ICache.IKeyFilter)
public void insert(java.lang.Object key,
java.lang.Object value)
ICache
insert in interface ICacheICache.insert(Object,Object)public void checkInvariant()
public void print()
public void printStatistics()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
IMC Epclient 5.0.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||