eXo Kernel :: Cache Extension :: Infinispan Implementation 2.4.8-GA

org.exoplatform.services.cache.impl.infinispan.distributed
Class DistributedExoCache<K extends Serializable,V>

java.lang.Object
  extended by org.exoplatform.services.cache.impl.infinispan.distributed.DistributedExoCache<K,V>
All Implemented Interfaces:
ExoCache<K,V>

public class DistributedExoCache<K extends Serializable,V>
extends Object
implements ExoCache<K,V>

Version:
$Id$
Author:
Nicolas Filotto

Nested Class Summary
 class DistributedExoCache.CacheEventListener
           
static class DistributedExoCache.CacheKey<K>
           
static class DistributedExoCache.ClearCacheMapper<K,V>
           
static class DistributedExoCache.ClearCacheReducer
           
static class DistributedExoCache.GetCachedObjectsMapper<K,V>
           
static class DistributedExoCache.GetCachedObjectsReducer<K,V>
           
static class DistributedExoCache.GetEntriesMapper<K,V>
           
static class DistributedExoCache.GetEntriesReducer<K,V>
           
static class DistributedExoCache.GetSizeMapper<K,V>
           
static class DistributedExoCache.GetSizeReducer<K>
           
 
Field Summary
protected  org.infinispan.AdvancedCache<DistributedExoCache.CacheKey<K>,V> cache
           
static String CACHE_NAME
           
 
Constructor Summary
DistributedExoCache(ExoContainerContext ctx, ExoCacheConfig config, org.infinispan.Cache<K,V> cache)
           
 
Method Summary
 void addCacheListener(CacheListener<? super K,? super V> listener)
          
 void clearCache()
          
 V get(Serializable name)
          
 List<V> getCachedObjects()
          
 int getCacheHit()
          
 int getCacheMiss()
          
 int getCacheSize()
          
 String getLabel()
          
 long getLiveTime()
           
 long getMaxIdle()
           
 int getMaxSize()
           
 String getName()
          
 long getWakeUpInterval()
           
 boolean isDistributed()
          
 boolean isLogEnabled()
          
 boolean isReplicated()
          
 void put(K key, V value)
          
 void putMap(Map<? extends K,? extends V> objs)
          
protected  void putOnly(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 setLabel(String label)
          
 void setLiveTime(long period)
           
 void setLogEnabled(boolean logEnabled)
          
 void setMaxSize(int max)
           
 void setName(String name)
          
 void setReplicated(boolean replicated)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_NAME

public static final String CACHE_NAME
See Also:
Constant Field Values

cache

protected final org.infinispan.AdvancedCache<DistributedExoCache.CacheKey<K extends Serializable>,V> cache
Constructor Detail

DistributedExoCache

public DistributedExoCache(ExoContainerContext ctx,
                           ExoCacheConfig config,
                           org.infinispan.Cache<K,V> cache)
Method Detail

addCacheListener

public void addCacheListener(CacheListener<? super K,? super V> listener)

Specified by:
addCacheListener in interface ExoCache<K extends Serializable,V>

clearCache

public void clearCache()

Specified by:
clearCache in interface ExoCache<K extends Serializable,V>

get

public V get(Serializable name)

Specified by:
get in interface ExoCache<K extends Serializable,V>

getCacheHit

public int getCacheHit()

Specified by:
getCacheHit in interface ExoCache<K extends Serializable,V>

getCacheMiss

public int getCacheMiss()

Specified by:
getCacheMiss in interface ExoCache<K extends Serializable,V>

getCacheSize

public int getCacheSize()

Specified by:
getCacheSize in interface ExoCache<K extends Serializable,V>

getCachedObjects

public List<V> getCachedObjects()

Specified by:
getCachedObjects in interface ExoCache<K extends Serializable,V>

getLabel

public String getLabel()

Specified by:
getLabel in interface ExoCache<K extends Serializable,V>

getName

public String getName()

Specified by:
getName in interface ExoCache<K extends Serializable,V>

isDistributed

public boolean isDistributed()


isLogEnabled

public boolean isLogEnabled()

Specified by:
isLogEnabled in interface ExoCache<K extends Serializable,V>

isReplicated

public boolean isReplicated()


put

public void put(K key,
                V value)
         throws IllegalArgumentException

Specified by:
put in interface ExoCache<K extends Serializable,V>
Throws:
IllegalArgumentException

putOnly

protected void putOnly(K key,
                       V value)
Only puts the data into the cache nothing more


putMap

public void putMap(Map<? extends K,? extends V> objs)
            throws IllegalArgumentException

Specified by:
putMap in interface ExoCache<K extends Serializable,V>
Throws:
IllegalArgumentException

remove

public V remove(Serializable name)
         throws IllegalArgumentException

Specified by:
remove in interface ExoCache<K extends Serializable,V>
Throws:
IllegalArgumentException

removeCachedObjects

public List<V> removeCachedObjects()

Specified by:
removeCachedObjects in interface ExoCache<K extends Serializable,V>

select

public void select(CachedObjectSelector<? super K,? super V> selector)
            throws Exception

Specified by:
select in interface ExoCache<K extends Serializable,V>
Throws:
Exception

setDistributed

public void setDistributed(boolean distributed)


setLabel

public void setLabel(String label)

Specified by:
setLabel in interface ExoCache<K extends Serializable,V>

setLogEnabled

public void setLogEnabled(boolean logEnabled)

Specified by:
setLogEnabled in interface ExoCache<K extends Serializable,V>

setName

public void setName(String name)

Specified by:
setName in interface ExoCache<K extends Serializable,V>

setReplicated

public void setReplicated(boolean replicated)


setMaxSize

public void setMaxSize(int max)
Specified by:
setMaxSize in interface ExoCache<K extends Serializable,V>

setLiveTime

public void setLiveTime(long period)
Specified by:
setLiveTime in interface ExoCache<K extends Serializable,V>

getMaxSize

public int getMaxSize()
Specified by:
getMaxSize in interface ExoCache<K extends Serializable,V>

getLiveTime

public long getLiveTime()
Specified by:
getLiveTime in interface ExoCache<K extends Serializable,V>

getMaxIdle

public long getMaxIdle()

getWakeUpInterval

public long getWakeUpInterval()

eXo Kernel :: Cache Extension :: Infinispan Implementation 2.4.8-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.