|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.util.CacheWrapper
public class CacheWrapper
Acts as a proxy for a Cache implementation. The Cache implementation can be switched on the fly, which enables users to hold a reference to a CacheWrapper object, but for the underlying Cache implementation to switch from clustered to local, etc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
CacheWrapper(Cache cache)
|
|
| Method Summary | |
|---|---|
void |
clear()
|
boolean |
containsKey(java.lang.Object key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
long |
getCacheHits()
Returns the number of cache hits. |
long |
getCacheMisses()
Returns the number of cache misses. |
int |
getCacheSize()
Returns the size of the cache contents in bytes. |
int |
getMaxCacheSize()
Returns the maximum size of the cache in bytes. |
long |
getMaxLifetime()
Returns the maximum number of milliseconds that any object can live in cache. |
java.lang.String |
getName()
Returns the name of the cache. |
Cache |
getWrappedCache()
|
boolean |
isEmpty()
|
java.util.Set |
keySet()
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map t)
|
java.lang.Object |
remove(java.lang.Object key)
|
void |
setMaxCacheSize(int maxSize)
Sets the maximum size of the cache in bytes. |
void |
setMaxLifetime(long maxLifetime)
Sets the maximum number of milliseconds that any object can live in cache. |
void |
setName(java.lang.String name)
Sets the name of the cache |
void |
setWrappedCache(Cache cache)
|
int |
size()
|
java.util.Collection |
values()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public CacheWrapper(Cache cache)
| Method Detail |
|---|
public Cache getWrappedCache()
public void setWrappedCache(Cache cache)
public java.lang.String getName()
Cache
getName in interface Cachepublic void setName(java.lang.String name)
Cache
setName in interface Cachename - the name of the cachepublic int getMaxCacheSize()
Cache
getMaxCacheSize in interface Cachepublic void setMaxCacheSize(int maxSize)
Cache
setMaxCacheSize in interface CachemaxSize - the maximum size of the cache in bytes.public long getMaxLifetime()
Cache
getMaxLifetime in interface Cachepublic void setMaxLifetime(long maxLifetime)
Cache
setMaxLifetime in interface CachemaxLifetime - the maximum number of milliseconds before objects are expired.public int getCacheSize()
Cache
getCacheSize in interface Cachepublic long getCacheHits()
CacheKeeping track of cache hits and misses lets one measure how efficient the cache is; the higher the percentage of hits, the more efficient.
getCacheHits in interface Cachepublic long getCacheMisses()
CacheKeeping track of cache hits and misses lets one measure how efficient the cache is; the higher the percentage of hits, the more efficient.
getCacheMisses in interface Cachepublic int size()
size in interface java.util.Mappublic void clear()
clear in interface java.util.Mappublic boolean isEmpty()
isEmpty in interface java.util.Mappublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Mappublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Mappublic void putAll(java.util.Map t)
putAll in interface java.util.Mappublic java.util.Set entrySet()
entrySet in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Mappublic java.lang.Object get(java.lang.Object key)
get in interface java.util.Mappublic java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Map
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Map
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||