org.red5.server.cache
public class NoCacheImpl extends Object implements ICacheStore, org.springframework.context.ApplicationContextAware
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
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 org.springframework.context.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(org.springframework.context.ApplicationContext context) |
void |
setMaxEntries(int max)
Sets the maximum number of entries for the cache.
|
public static NoCacheImpl getInstance()
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public static org.springframework.context.ApplicationContext getApplicationContext()
public 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 objectpublic 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 returnnull
if no such object was foundpublic boolean remove(ICacheable obj)
remove
in interface ICacheStore
obj
- the object to deletepublic boolean remove(String name)
remove
in interface ICacheStore
name
- the name of the object to deletepublic 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
Copyright © 2006-2012 The Red5 Project