|
eXo Kernel :: Component :: Cache Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - the type of keys maintained by this cacheV - the type of cached valuespublic interface ExoCache<K extends Serializable,V>
A bare cache. Created by The eXo Platform SAS. Author : Tuan Nguyen tuan08@users.sourceforge.net Date: Jun 14, 2003 Time: 1:12:22 PM
| Method Summary | |
|---|---|
void |
addCacheListener(CacheListener<? super K,? super V> listener)
Add a listener. |
void |
clearCache()
Clears the cache. |
V |
get(Serializable key)
Performs a lookup operation. |
List<? extends V> |
getCachedObjects()
Returns a list of cached object that are considered as valid when the method is called. |
int |
getCacheHit()
Returns the number of time the cache was queried and a valid entry was returned. |
int |
getCacheMiss()
Returns the number of time the cache was queried and no entry was returned. |
int |
getCacheSize()
Returns the number of entries in the cache. |
String |
getLabel()
|
long |
getLiveTime()
Returns the maximum life time of an entry in the cache. |
int |
getMaxSize()
Returns the maximum capacity of the cache. |
String |
getName()
Returns the cache name |
boolean |
isLogEnabled()
|
void |
put(K key,
V value)
Performs a put in the cache. |
void |
putMap(Map<? extends K,? extends V> objs)
Performs a put of all the entries provided by the map argument. |
V |
remove(Serializable key)
Removes an entry from the cache. |
List<? extends V> |
removeCachedObjects()
Clears the cache and returns the list of cached object that are considered as valid when the method is called. |
void |
select(CachedObjectSelector<? super K,? super V> selector)
Selects a subset of the cache. |
void |
setLabel(String s)
|
void |
setLiveTime(long period)
Sets the maximum life time of an entry in the cache. |
void |
setLogEnabled(boolean b)
|
void |
setMaxSize(int max)
Sets the maximum capacity of the cache. |
void |
setName(String name)
Sets the cache name. |
| Method Detail |
|---|
String getName()
void setName(String name)
name - the cache nameString getLabel()
void setLabel(String s)
V get(Serializable key)
key - the cache key
V remove(Serializable key)
throws NullPointerException
key - the cache key
NullPointerException - if the provided key is null
void put(K key,
V value)
throws NullPointerException
key - the cache keyvalue - the cached value
NullPointerException - if the key is null
void putMap(Map<? extends K,? extends V> objs)
throws NullPointerException,
IllegalArgumentException
objs - the objects to put
NullPointerException - if the provided argument is null
IllegalArgumentException - if the provided map contains a null keyvoid clearCache()
void select(CachedObjectSelector<? super K,? super V> selector)
throws Exception
selector - the selector
Exception - any exceptionint getCacheSize()
int getMaxSize()
void setMaxSize(int max)
max - the maximum capacitylong getLiveTime()
void setLiveTime(long period)
period - the live timeint getCacheHit()
int getCacheMiss()
List<? extends V> getCachedObjects()
throws Exception
Exception - any exceptionList<? extends V> removeCachedObjects()
Exception - any exception
void addCacheListener(CacheListener<? super K,? super V> listener)
throws NullPointerException
listener - the listener to add
NullPointerException - if the listener is nullboolean isLogEnabled()
void setLogEnabled(boolean b)
|
eXo Kernel :: Component :: Cache Service 2.4.0-CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||