|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.cache.NoCacheImpl
public class NoCacheImpl
Provides an implementation of an object cache which actually does not provide a cache.
Field Summary | |
---|---|
protected static Logger |
log
|
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'. |
static long |
getCacheMiss()
Getter for property 'cacheMiss'. |
static NoCacheImpl |
getInstance()
Returns the instance of this class. |
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. |
boolean |
offer(String key,
IoBuffer obj)
|
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 |
setMaxEntries(int max)
Sets the maximum number of entries for the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
Method Detail |
---|
public static NoCacheImpl getInstance()
public void setApplicationContext(ApplicationContext context) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public static ApplicationContext getApplicationContext()
public Iterator<String> getObjectNames()
getObjectNames
in interface ICacheStore
public Iterator<SoftReference<? extends ICacheable>> getObjects()
getObjects
in interface ICacheStore
public boolean offer(String key, IoBuffer obj)
public boolean offer(String name, Object obj)
offer
in interface ICacheStore
name
- string name representing the objectobj
- cacheable object
public void put(String name, Object obj)
put
in interface ICacheStore
name
- string name representing the objectobj
- cacheable objectpublic ICacheable get(String name)
get
in interface ICacheStore
name
- the name of the object to return
null
if no such object was foundpublic 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 static long getCacheHit()
public static long getCacheMiss()
public void setMaxEntries(int max)
setMaxEntries
in interface ICacheStore
max
- upper-limit of the cachepublic void destroy()
destroy
in interface ICacheStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |