|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap
org.exoplatform.services.cache.BaseExoCache
public abstract class BaseExoCache
Created by The eXo Platform SAS Author : Tuan Nguyen tuan08@users.sourceforge.net Sat, Sep 13, 2003 @ Time: 1:12:22 PM
| Constructor Summary | |
|---|---|
BaseExoCache()
|
|
BaseExoCache(int maxSize)
|
|
BaseExoCache(String name,
int maxSize)
|
|
| Method Summary | |
|---|---|
void |
addCacheListener(CacheListener listener)
|
void |
clearCache()
Clears the cache. |
protected abstract ObjectCacheInfo |
createObjectCacheInfo(long expTime,
Object objToCache)
|
Object |
get(Serializable name)
Performs a lookup operation. |
List |
getCachedObjects()
Returns a list of cached object that are considered as valid when the method is called. |
int |
getCacheHit()
|
int |
getCacheMiss()
|
int |
getCacheSize()
|
String |
getLabel()
|
long |
getLiveTime()
|
int |
getMaxSize()
|
String |
getName()
|
boolean |
isDistributed()
|
boolean |
isLogEnabled()
|
boolean |
isReplicated()
|
void |
localClear()
|
void |
localPut(Serializable key,
Object obj)
|
Object |
localRemove(Serializable key)
|
void |
put(Serializable name,
Object obj)
Performs a put in the cache. |
void |
putMap(Map<Serializable,Object> objs)
For whole put of items set |
Object |
remove(Serializable name)
Removes an entry from the cache. |
List |
removeCachedObjects()
Clears the cache and returns the list of cached object that are considered as valid when the method is called. |
protected boolean |
removeEldestEntry(Map.Entry eldest)
|
void |
select(CachedObjectSelector selector)
Selects a subset of the cache. |
void |
setDistributed(boolean b)
|
void |
setLabel(String name)
|
void |
setLiveTime(long period)
|
void |
setLogEnabled(boolean b)
|
void |
setMaxSize(int max)
|
void |
setName(String s)
|
void |
setReplicated(boolean b)
|
| Methods inherited from class java.util.LinkedHashMap |
|---|
clear, containsValue, get |
| Methods inherited from class java.util.HashMap |
|---|
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
| Constructor Detail |
|---|
public BaseExoCache()
public BaseExoCache(int maxSize)
public BaseExoCache(String name,
int maxSize)
| Method Detail |
|---|
public String getName()
getName in interface ExoCachepublic void setName(String s)
setName in interface ExoCachepublic String getLabel()
getLabel in interface ExoCachepublic void setLabel(String name)
setLabel in interface ExoCachepublic int getCacheSize()
getCacheSize in interface ExoCachepublic int getMaxSize()
getMaxSize in interface ExoCachepublic void setMaxSize(int max)
setMaxSize in interface ExoCachepublic long getLiveTime()
getLiveTime in interface ExoCachepublic void setLiveTime(long period)
setLiveTime in interface ExoCache
public Object get(Serializable name)
throws Exception
ExoCache
get in interface ExoCachename - the cache key
Exception - any exception
public Object remove(Serializable name)
throws Exception
ExoCache
remove in interface ExoCachename - the cache key
Exception - any exception
public void select(CachedObjectSelector selector)
throws Exception
ExoCache
select in interface ExoCacheselector - the selector
Exception - any exception
public void put(Serializable name,
Object obj)
throws Exception
ExoCache
put in interface ExoCachename - the cache keyobj - the cached value
Exception - any exception
public void putMap(Map<Serializable,Object> objs)
throws Exception
putMap in interface ExoCacheobjs - the objects to put
Exception - any exception
public void clearCache()
throws Exception
ExoCache
clearCache in interface ExoCacheException - any exceptionpublic int getCacheHit()
getCacheHit in interface ExoCachepublic int getCacheMiss()
getCacheMiss in interface ExoCachepublic boolean isDistributed()
isDistributed in interface ExoCachepublic void setDistributed(boolean b)
setDistributed in interface ExoCachepublic boolean isReplicated()
isReplicated in interface ExoCachepublic void setReplicated(boolean b)
setReplicated in interface ExoCacheprotected boolean removeEldestEntry(Map.Entry eldest)
removeEldestEntry in class LinkedHashMappublic List getCachedObjects()
ExoCache
getCachedObjects in interface ExoCache
public List removeCachedObjects()
throws Exception
ExoCache
removeCachedObjects in interface ExoCacheException - any exceptionpublic void addCacheListener(CacheListener listener)
addCacheListener in interface ExoCache
public void localPut(Serializable key,
Object obj)
throws Exception
Exception
public Object localRemove(Serializable key)
throws Exception
Exception
public void localClear()
throws Exception
Exceptionpublic boolean isLogEnabled()
isLogEnabled in interface ExoCachepublic void setLogEnabled(boolean b)
setLogEnabled in interface ExoCache
protected abstract ObjectCacheInfo createObjectCacheInfo(long expTime,
Object objToCache)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||