public class MCExoCache<K extends Serializable,V> extends Object implements ExoCache<K,V>
ExoCache implementation based on spymemcached.| Modifier and Type | Field and Description |
|---|---|
protected net.spy.memcached.MemcachedClient |
cache |
| Constructor and Description |
|---|
MCExoCache(ExoContainerContext ctx,
ExoCacheConfig config,
net.spy.memcached.MemcachedClient cache,
long expirationTimeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheListener(CacheListener<? super K,? super V> listener) |
void |
clearCache() |
V |
get(Serializable name) |
List<V> |
getCachedObjects() |
int |
getCacheHit() |
int |
getCacheMiss() |
int |
getCacheSize() |
long |
getExpirationTimeout() |
String |
getLabel() |
long |
getLiveTime() |
int |
getMaxSize() |
String |
getName() |
boolean |
isDistributed() |
boolean |
isLogEnabled() |
boolean |
isReplicated() |
void |
put(K key,
V value) |
void |
putMap(Map<? extends K,? extends V> objs) |
protected void |
putOnly(String namespace,
K key,
V value)
Only puts the data into the cache nothing more
|
V |
remove(Serializable name) |
List<V> |
removeCachedObjects() |
void |
select(CachedObjectSelector<? super K,? super V> selector) |
void |
setDistributed(boolean distributed) |
void |
setExpirationTimeout(long expirationTimeout) |
void |
setLabel(String label) |
void |
setLiveTime(long period) |
void |
setLogEnabled(boolean logEnabled) |
void |
setMaxSize(int max) |
void |
setName(String name) |
void |
setReplicated(boolean replicated) |
public MCExoCache(ExoContainerContext ctx, ExoCacheConfig config, net.spy.memcached.MemcachedClient cache, long expirationTimeout)
public void addCacheListener(CacheListener<? super K,? super V> listener)
addCacheListener in interface ExoCache<K extends Serializable,V>public void clearCache()
clearCache in interface ExoCache<K extends Serializable,V>public V get(Serializable name)
get in interface ExoCache<K extends Serializable,V>public int getCacheHit()
getCacheHit in interface ExoCache<K extends Serializable,V>public int getCacheMiss()
getCacheMiss in interface ExoCache<K extends Serializable,V>public int getCacheSize()
getCacheSize in interface ExoCache<K extends Serializable,V>public List<V> getCachedObjects()
getCachedObjects in interface ExoCache<K extends Serializable,V>public String getLabel()
getLabel in interface ExoCache<K extends Serializable,V>public String getName()
getName in interface ExoCache<K extends Serializable,V>public boolean isDistributed()
public boolean isLogEnabled()
isLogEnabled in interface ExoCache<K extends Serializable,V>public boolean isReplicated()
public void put(K key, V value) throws IllegalArgumentException
put in interface ExoCache<K extends Serializable,V>IllegalArgumentExceptionprotected void putOnly(String namespace, K key, V value)
public void putMap(Map<? extends K,? extends V> objs) throws IllegalArgumentException
putMap in interface ExoCache<K extends Serializable,V>IllegalArgumentExceptionpublic V remove(Serializable name) throws IllegalArgumentException
remove in interface ExoCache<K extends Serializable,V>IllegalArgumentExceptionpublic List<V> removeCachedObjects()
removeCachedObjects in interface ExoCache<K extends Serializable,V>public void select(CachedObjectSelector<? super K,? super V> selector) throws Exception
public void setDistributed(boolean distributed)
public void setLabel(String label)
setLabel in interface ExoCache<K extends Serializable,V>public void setLogEnabled(boolean logEnabled)
setLogEnabled in interface ExoCache<K extends Serializable,V>public void setName(String name)
setName in interface ExoCache<K extends Serializable,V>public void setReplicated(boolean replicated)
public long getExpirationTimeout()
public void setExpirationTimeout(long expirationTimeout)
public void setMaxSize(int max)
setMaxSize in interface ExoCache<K extends Serializable,V>public void setLiveTime(long period)
setLiveTime in interface ExoCache<K extends Serializable,V>public int getMaxSize()
getMaxSize in interface ExoCache<K extends Serializable,V>public long getLiveTime()
getLiveTime in interface ExoCache<K extends Serializable,V>Copyright © 2016 eXo Platform SAS. All Rights Reserved.