org.exoplatform.services.cache.impl.jboss
Class AbstractExoCache

java.lang.Object
  extended by org.exoplatform.services.cache.impl.jboss.AbstractExoCache
All Implemented Interfaces:
ExoCache
Direct Known Subclasses:
LFUExoCacheCreator.LFUExoCache, LRUExoCacheCreator.LRUExoCache

public abstract class AbstractExoCache
extends java.lang.Object
implements ExoCache

An ExoCache implementation based on Node. Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com 20 juil. 2009


Nested Class Summary
 class AbstractExoCache.CacheEventListener
           
 
Field Summary
protected  org.jboss.cache.TreeCache cache
           
 
Constructor Summary
AbstractExoCache(ExoCacheConfig config, org.jboss.cache.TreeCache cache)
           
 
Method Summary
 void addCacheListener(CacheListener listener)
          
 void clearCache()
          
 java.lang.Object get(java.io.Serializable name)
          
 java.util.List<java.lang.Object> getCachedObjects()
          
 int getCacheHit()
          
 int getCacheMiss()
          
 int getCacheSize()
          
 java.lang.String getLabel()
          
 java.lang.String getName()
          
 boolean isDistributed()
          
 boolean isLogEnabled()
          
 boolean isReplicated()
          
 void put(java.io.Serializable name, java.lang.Object obj)
          
 void putMap(java.util.Map<java.io.Serializable,java.lang.Object> objs)
          
 java.lang.Object remove(java.io.Serializable name)
          
 java.util.List<java.lang.Object> removeCachedObjects()
          
 void select(CachedObjectSelector selector)
          
 void setDistributed(boolean distributed)
          
 void setLabel(java.lang.String label)
          
 void setLogEnabled(boolean logEnabled)
          
 void setName(java.lang.String name)
          
 void setReplicated(boolean replicated)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exoplatform.services.cache.ExoCache
getLiveTime, getMaxSize, setLiveTime, setMaxSize
 

Field Detail

cache

protected final org.jboss.cache.TreeCache cache
Constructor Detail

AbstractExoCache

public AbstractExoCache(ExoCacheConfig config,
                        org.jboss.cache.TreeCache cache)
Method Detail

addCacheListener

public void addCacheListener(CacheListener listener)

Specified by:
addCacheListener in interface ExoCache

clearCache

public void clearCache()
                throws java.lang.Exception

Specified by:
clearCache in interface ExoCache
Throws:
java.lang.Exception

get

public java.lang.Object get(java.io.Serializable name)
                     throws java.lang.Exception

Specified by:
get in interface ExoCache
Throws:
java.lang.Exception

getCacheHit

public int getCacheHit()

Specified by:
getCacheHit in interface ExoCache

getCacheMiss

public int getCacheMiss()

Specified by:
getCacheMiss in interface ExoCache

getCacheSize

public int getCacheSize()

Specified by:
getCacheSize in interface ExoCache

getCachedObjects

public java.util.List<java.lang.Object> getCachedObjects()

Specified by:
getCachedObjects in interface ExoCache

getLabel

public java.lang.String getLabel()

Specified by:
getLabel in interface ExoCache

getName

public java.lang.String getName()

Specified by:
getName in interface ExoCache

isDistributed

public boolean isDistributed()

Specified by:
isDistributed in interface ExoCache

isLogEnabled

public boolean isLogEnabled()

Specified by:
isLogEnabled in interface ExoCache

isReplicated

public boolean isReplicated()

Specified by:
isReplicated in interface ExoCache

put

public void put(java.io.Serializable name,
                java.lang.Object obj)
         throws java.lang.Exception

Specified by:
put in interface ExoCache
Throws:
java.lang.Exception

putMap

public void putMap(java.util.Map<java.io.Serializable,java.lang.Object> objs)
            throws java.lang.Exception

Specified by:
putMap in interface ExoCache
Throws:
java.lang.Exception

remove

public java.lang.Object remove(java.io.Serializable name)
                        throws java.lang.Exception

Specified by:
remove in interface ExoCache
Throws:
java.lang.Exception

removeCachedObjects

public java.util.List<java.lang.Object> removeCachedObjects()
                                                     throws java.lang.Exception

Specified by:
removeCachedObjects in interface ExoCache
Throws:
java.lang.Exception

select

public void select(CachedObjectSelector selector)
            throws java.lang.Exception

Specified by:
select in interface ExoCache
Throws:
java.lang.Exception

setDistributed

public void setDistributed(boolean distributed)

Specified by:
setDistributed in interface ExoCache

setLabel

public void setLabel(java.lang.String label)

Specified by:
setLabel in interface ExoCache

setLogEnabled

public void setLogEnabled(boolean logEnabled)

Specified by:
setLogEnabled in interface ExoCache

setName

public void setName(java.lang.String name)

Specified by:
setName in interface ExoCache

setReplicated

public void setReplicated(boolean replicated)

Specified by:
setReplicated in interface ExoCache


Copyright © 2010 eXo Platform SAS. All Rights Reserved.