|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.cache.EhCacheImpl
public class EhCacheImpl
Provides an implementation of an object cache using EhCache.
Field Summary | |
---|---|
protected static Logger |
log
|
Constructor Summary | |
---|---|
EhCacheImpl()
|
Method Summary | |
---|---|
void |
destroy()
Allows for cleanup of a cache implementation. |
ICacheable |
get(String name)
Return a cached object with the given name. |
static ApplicationContext |
getApplicationContext()
Getter for property 'applicationContext'. |
static long |
getCacheHit()
Getter for property 'cacheHit'. |
CacheManagerEventListener |
getCacheManagerEventListener()
Getter for property 'cacheManagerEventListener'. |
static long |
getCacheMiss()
Getter for property 'cacheMiss'. |
int |
getDiskExpiryThreadIntervalSeconds()
Getter for property 'diskExpiryThreadIntervalSeconds'. |
String |
getDiskStore()
Getter for property 'diskStore'. |
String |
getMemoryStoreEvictionPolicy()
Getter for property 'memoryStoreEvictionPolicy'. |
Iterator<String> |
getObjectNames()
Return iterator over the names of all already loaded objects in the storage. |
Iterator<SoftReference<? extends ICacheable>> |
getObjects()
Return iterator over the already loaded objects in the storage. |
void |
init()
|
boolean |
offer(String name,
Object obj)
Offer an object to the cache with an associated key. |
void |
put(String name,
Object obj)
Puts an object in the cache with the associated key. |
boolean |
remove(ICacheable obj)
Delete the passed cached object. |
boolean |
remove(String name)
Delete the cached object with the given name. |
void |
setApplicationContext(ApplicationContext context)
|
void |
setCacheConfigs(List<CacheConfiguration> configs)
Setter for property 'cacheConfigs'. |
void |
setCacheManagerEventListener(CacheManagerEventListener cacheManagerEventListener)
Setter for property 'cacheManagerEventListener'. |
void |
setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds)
Setter for property 'diskExpiryThreadIntervalSeconds'. |
void |
setDiskStore(String diskStore)
Setter for property 'diskStore'. |
void |
setMaxEntries(int capacity)
Sets the maximum number of entries for the cache. |
void |
setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Setter for property 'memoryStoreEvictionPolicy'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
Constructor Detail |
---|
public EhCacheImpl()
Method Detail |
---|
public void setApplicationContext(ApplicationContext context) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public static ApplicationContext getApplicationContext()
public void init()
public ICacheable get(String name)
get
in interface ICacheStore
name
- the name of the object to return
null
if no such object was foundpublic void put(String name, Object obj)
put
in interface ICacheStore
name
- string name representing the objectobj
- cacheable objectpublic Iterator<String> getObjectNames()
getObjectNames
in interface ICacheStore
public Iterator<SoftReference<? extends ICacheable>> getObjects()
getObjects
in interface ICacheStore
public boolean offer(String name, Object obj)
offer
in interface ICacheStore
name
- string name representing the objectobj
- cacheable object
public boolean remove(ICacheable obj)
remove
in interface ICacheStore
obj
- the object to delete
public boolean remove(String name)
remove
in interface ICacheStore
name
- the name of the object to delete
public void setCacheConfigs(List<CacheConfiguration> configs)
configs
- Value to set for property 'cacheConfigs'.public void setMaxEntries(int capacity)
setMaxEntries
in interface ICacheStore
capacity
- upper-limit of the cachepublic String getMemoryStoreEvictionPolicy()
public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
memoryStoreEvictionPolicy
- Value to set for property 'memoryStoreEvictionPolicy'.public int getDiskExpiryThreadIntervalSeconds()
public void setDiskExpiryThreadIntervalSeconds(int diskExpiryThreadIntervalSeconds)
diskExpiryThreadIntervalSeconds
- Value to set for property 'diskExpiryThreadIntervalSeconds'.public String getDiskStore()
public void setDiskStore(String diskStore)
diskStore
- Value to set for property 'diskStore'.public CacheManagerEventListener getCacheManagerEventListener()
public void setCacheManagerEventListener(CacheManagerEventListener cacheManagerEventListener)
cacheManagerEventListener
- Value to set for property 'cacheManagerEventListener'.public static long getCacheHit()
public static long getCacheMiss()
public void destroy()
destroy
in interface ICacheStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |