|
||||||||||
| 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(java.lang.String name,
int maxSize)
|
|
| Method Summary | |
|---|---|
void |
addCacheListener(CacheListener listener)
|
void |
clearCache()
Clears the cache. |
protected abstract ObjectCacheInfo |
createObjectCacheInfo(long expTime,
java.lang.Object objToCache)
|
java.lang.Object |
get(java.io.Serializable name)
Performs a lookup operation. |
java.util.List |
getCachedObjects()
Returns a list of cached object that are considered as valid when the method is called. |
int |
getCacheHit()
|
int |
getCacheMiss()
|
int |
getCacheSize()
|
java.lang.String |
getLabel()
|
long |
getLiveTime()
|
int |
getMaxSize()
|
java.lang.String |
getName()
|
boolean |
isDistributed()
|
boolean |
isLogEnabled()
|
boolean |
isReplicated()
|
void |
localClear()
|
void |
localPut(java.io.Serializable key,
java.lang.Object obj)
|
java.lang.Object |
localRemove(java.io.Serializable key)
|
void |
put(java.io.Serializable name,
java.lang.Object obj)
Performs a put in the cache. |
void |
putMap(java.util.Map<java.io.Serializable,java.lang.Object> objs)
For whole put of items set |
java.lang.Object |
remove(java.io.Serializable name)
Removes an entry from the cache. |
java.util.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(java.util.Map.Entry eldest)
|
void |
select(CachedObjectSelector selector)
Selects a subset of the cache. |
void |
setDistributed(boolean b)
|
void |
setLabel(java.lang.String name)
|
void |
setLiveTime(long period)
|
void |
setLogEnabled(boolean b)
|
void |
setMaxSize(int max)
|
void |
setName(java.lang.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(java.lang.String name,
int maxSize)
| Method Detail |
|---|
public java.lang.String getName()
getName in interface ExoCachepublic void setName(java.lang.String s)
setName in interface ExoCachepublic java.lang.String getLabel()
getLabel in interface ExoCachepublic void setLabel(java.lang.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 java.lang.Object get(java.io.Serializable name)
throws java.lang.Exception
ExoCache
get in interface ExoCachename - the cache key
java.lang.Exception - any exception
public java.lang.Object remove(java.io.Serializable name)
throws java.lang.Exception
ExoCache
remove in interface ExoCachename - the cache key
java.lang.Exception - any exception
public void select(CachedObjectSelector selector)
throws java.lang.Exception
ExoCache
select in interface ExoCacheselector - the selector
java.lang.Exception - any exception
public void put(java.io.Serializable name,
java.lang.Object obj)
throws java.lang.Exception
ExoCache
put in interface ExoCachename - the cache keyobj - the cached value
java.lang.Exception - any exception
public void putMap(java.util.Map<java.io.Serializable,java.lang.Object> objs)
throws java.lang.Exception
putMap in interface ExoCacheobjs - the objects to put
java.lang.Exception - any exception
public void clearCache()
throws java.lang.Exception
ExoCache
clearCache in interface ExoCachejava.lang.Exception - 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(java.util.Map.Entry eldest)
removeEldestEntry in class java.util.LinkedHashMappublic java.util.List getCachedObjects()
ExoCache
getCachedObjects in interface ExoCache
public java.util.List removeCachedObjects()
throws java.lang.Exception
ExoCache
removeCachedObjects in interface ExoCachejava.lang.Exception - any exceptionpublic void addCacheListener(CacheListener listener)
addCacheListener in interface ExoCache
public void localPut(java.io.Serializable key,
java.lang.Object obj)
throws java.lang.Exception
java.lang.Exception
public java.lang.Object localRemove(java.io.Serializable key)
throws java.lang.Exception
java.lang.Exception
public void localClear()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isLogEnabled()
isLogEnabled in interface ExoCachepublic void setLogEnabled(boolean b)
setLogEnabled in interface ExoCache
protected abstract ObjectCacheInfo createObjectCacheInfo(long expTime,
java.lang.Object objToCache)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||