org.apache.jcs.auxiliary.lateral.socket.tcp
Class MockLateralCache<K extends Serializable,V extends Serializable>

java.lang.Object
  extended by org.apache.jcs.auxiliary.AbstractAuxiliaryCache<K,V>
      extended by org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging<K,V>
          extended by org.apache.jcs.auxiliary.lateral.LateralCache<K,V>
              extended by org.apache.jcs.auxiliary.lateral.socket.tcp.MockLateralCache<K,V>
All Implemented Interfaces:
AuxiliaryCache<K,V>, ICache<K,V>, ICacheType

public class MockLateralCache<K extends Serializable,V extends Serializable>
extends LateralCache<K,V>
implements ICache<K,V>

For testing things that need a lateral cache


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.jcs.engine.behavior.ICacheType
ICacheType.CacheType
 
Field Summary
 
Fields inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache
cacheEventLogger, elementSerializer, keyMatcher
 
Constructor Summary
protected MockLateralCache(ILateralCacheAttributes cattr)
           
 
Method Summary
 int getSize()
           
 String getStats()
           
 CacheStatus getStatus()
           
 void processDispose()
           
protected  ICacheElement<K,V> processGet(K key)
           
protected  boolean processRemove(K key)
           
 void processRemoveAll()
           
protected  void processUpdate(ICacheElement<K,V> ce)
          Nothing.
 
Methods inherited from class org.apache.jcs.auxiliary.lateral.LateralCache
fixCache, getAuxiliaryCacheAttributes, getCacheName, getCacheType, getEventLoggingExtraInfo, getGroupKeys, getGroupNames, getStatistics, processGetMatching, processGetMultiple, toString
 
Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCacheEventLogging
dispose, disposeWithEventLogging, get, getMatching, getMatchingWithEventLogging, getMultiple, getMultipleWithEventLogging, getWithEventLogging, remove, removeAll, removeAllWithEventLogging, removeWithEventLogging, update, updateWithEventLogging
 
Methods inherited from class org.apache.jcs.auxiliary.AbstractAuxiliaryCache
createICacheEvent, createICacheEvent, getCacheEventLogger, getElementSerializer, getKeyMatcher, logApplicationEvent, logError, logICacheEvent, setCacheEventLogger, setElementSerializer, setKeyMatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICache
dispose, get, getCacheName, getMatching, getMultiple, remove, removeAll, setKeyMatcher, update
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICacheType
getCacheType
 

Constructor Detail

MockLateralCache

protected MockLateralCache(ILateralCacheAttributes cattr)
Parameters:
cattr -
Method Detail

processUpdate

protected void processUpdate(ICacheElement<K,V> ce)
                      throws IOException
Nothing.

Overrides:
processUpdate in class LateralCache<K extends Serializable,V extends Serializable>
Parameters:
ce -
Throws:
IOException

processGet

protected ICacheElement<K,V> processGet(K key)
                                                                           throws IOException
Overrides:
processGet in class LateralCache<K extends Serializable,V extends Serializable>
Parameters:
key -
Returns:
ICacheElement
Throws:
IOException

processRemove

protected boolean processRemove(K key)
                         throws IOException
Overrides:
processRemove in class LateralCache<K extends Serializable,V extends Serializable>
Parameters:
key -
Returns:
false
Throws:
IOException

processRemoveAll

public void processRemoveAll()
                      throws IOException
Overrides:
processRemoveAll in class LateralCache<K extends Serializable,V extends Serializable>
Throws:
IOException

processDispose

public void processDispose()
                    throws IOException
Overrides:
processDispose in class LateralCache<K extends Serializable,V extends Serializable>
Throws:
IOException

getSize

public int getSize()
Specified by:
getSize in interface ICache<K extends Serializable,V extends Serializable>
Overrides:
getSize in class LateralCache<K extends Serializable,V extends Serializable>
Returns:
0

getStatus

public CacheStatus getStatus()
Specified by:
getStatus in interface ICache<K extends Serializable,V extends Serializable>
Overrides:
getStatus in class LateralCache<K extends Serializable,V extends Serializable>
Returns:
0

getStats

public String getStats()
Specified by:
getStats in interface ICache<K extends Serializable,V extends Serializable>
Overrides:
getStats in class LateralCache<K extends Serializable,V extends Serializable>
Returns:
String


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.