|
Elexis API documentationVersion 2.1.6 as of January 22 2012 | |||||||||
| 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
|
| 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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 API documentationVersion 2.1.6 as of January 22 2012 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||