|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.data.cache.SoftCache<K>
public class SoftCache<K>
A Cache with soft references and optional expiring items The cache keeps count on numbes of items that are added, removed or expired and can display its statistic
Nested Class Summary | |
---|---|
class |
SoftCache.CacheEntry
|
Field Summary | |
---|---|
protected java.util.Map<K,SoftCache.CacheEntry> |
cache
|
protected long |
expired
|
protected long |
hits
|
protected long |
inserts
|
protected Log |
log
|
protected long |
misses
|
protected long |
removed
|
Constructor Summary | |
---|---|
SoftCache()
|
|
SoftCache(int num)
|
|
SoftCache(int num,
float load)
|
Method Summary | |
---|---|
void |
clear()
|
java.lang.Object |
get(K key)
retrieve a previously inserted object |
void |
purge()
Expire and remove all Objects (without removing the SoftReferences, to avoid ConcurrentModificationExceptions) |
void |
put(K key,
java.lang.Object object,
int timeToCacheInSeconds)
Insert an Object that will stay until it is manually removed, or memory gets low, or at most for ICacheable#getCacheTime seconds |
void |
remove(K key)
|
void |
reset()
completely delete cache |
void |
stat()
write statistics to log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<K,SoftCache.CacheEntry> cache
protected long hits
protected long misses
protected long removed
protected long inserts
protected long expired
protected Log log
Constructor Detail |
---|
public SoftCache()
public SoftCache(int num, float load)
public SoftCache(int num)
Method Detail |
---|
public void put(K key, java.lang.Object object, int timeToCacheInSeconds)
IPersistentObjectCache
put
in interface IPersistentObjectCache<K>
public java.lang.Object get(K key)
IPersistentObjectCache
get
in interface IPersistentObjectCache<K>
public void remove(K key)
remove
in interface IPersistentObjectCache<K>
public void clear()
clear
in interface IPersistentObjectCache<K>
public void stat()
IPersistentObjectCache
stat
in interface IPersistentObjectCache<K>
public void purge()
IPersistentObjectCache
purge
in interface IPersistentObjectCache<K>
public void reset()
IPersistentObjectCache
reset
in interface IPersistentObjectCache<K>
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |