public class EhCacheImpl extends Object implements ICacheStore, ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
EhCacheImpl() |
| Modifier and Type | Method and Description |
|---|---|
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'.
|
net.sf.ehcache.event.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<net.sf.ehcache.config.CacheConfiguration> configs)
Setter for property 'cacheConfigs'.
|
void |
setCacheManagerEventListener(net.sf.ehcache.event.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'.
|
public void setApplicationContext(ApplicationContext context) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic static ApplicationContext getApplicationContext()
public void init()
public ICacheable get(String name)
get in interface ICacheStorename - the name of the object to returnnull if no such object was foundpublic void put(String name, Object obj)
put in interface ICacheStorename - string name representing the objectobj - cacheable objectpublic Iterator<String> getObjectNames()
getObjectNames in interface ICacheStorepublic Iterator<SoftReference<? extends ICacheable>> getObjects()
getObjects in interface ICacheStorepublic boolean offer(String name, Object obj)
offer in interface ICacheStorename - string name representing the objectobj - cacheable objectpublic boolean remove(ICacheable obj)
remove in interface ICacheStoreobj - the object to deletepublic boolean remove(String name)
remove in interface ICacheStorename - the name of the object to deletepublic void setCacheConfigs(List<net.sf.ehcache.config.CacheConfiguration> configs)
configs - Value to set for property 'cacheConfigs'.public void setMaxEntries(int capacity)
setMaxEntries in interface ICacheStorecapacity - 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 net.sf.ehcache.event.CacheManagerEventListener getCacheManagerEventListener()
public void setCacheManagerEventListener(net.sf.ehcache.event.CacheManagerEventListener cacheManagerEventListener)
cacheManagerEventListener - Value to set for property 'cacheManagerEventListener'.public static long getCacheHit()
public static long getCacheMiss()
public void destroy()
destroy in interface ICacheStoreCopyright © 2005–2017 Red5. All rights reserved.