org.apache.jcs.engine
Class CacheAdaptor

java.lang.Object
  extended byorg.apache.jcs.engine.CacheAdaptor
All Implemented Interfaces:
ICacheListener

public class CacheAdaptor
extends java.lang.Object
implements ICacheListener

Used for Cache-to-Cache messaging purposes.

Author:
asmuts

Field Summary
private  ICache cache
           
protected  byte listenerId
          Description of the Field
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
CacheAdaptor(ICache cache)
          Constructor for the CacheAdaptor object
 
Method Summary
 byte getListenerId()
          Gets the listenerId attribute of the CacheAdaptor object
 void handleDispose(java.lang.String cacheName)
          Description of the Method
 void handlePut(ICacheElement item)
          Description of the Method
 void handleRemove(java.lang.String cacheName, java.io.Serializable key)
          Description of the Method
 void handleRemoveAll(java.lang.String cacheName)
          Description of the Method
 void setListenerId(byte id)
          Sets the listenerId attribute of the CacheAdaptor object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

cache

private final ICache cache

listenerId

protected byte listenerId
Description of the Field

Constructor Detail

CacheAdaptor

public CacheAdaptor(ICache cache)
Constructor for the CacheAdaptor object

Parameters:
cache -
Method Detail

setListenerId

public void setListenerId(byte id)
                   throws java.io.IOException
Sets the listenerId attribute of the CacheAdaptor object

Specified by:
setListenerId in interface ICacheListener
Parameters:
id - The new listenerId value
Throws:
java.io.IOException

getListenerId

public byte getListenerId()
                   throws java.io.IOException
Gets the listenerId attribute of the CacheAdaptor object

Specified by:
getListenerId in interface ICacheListener
Returns:
The listenerId value
Throws:
java.io.IOException

handlePut

public void handlePut(ICacheElement item)
               throws java.io.IOException
Description of the Method

Specified by:
handlePut in interface ICacheListener
Throws:
java.io.IOException

handleRemove

public void handleRemove(java.lang.String cacheName,
                         java.io.Serializable key)
                  throws java.io.IOException
Description of the Method

Specified by:
handleRemove in interface ICacheListener
Throws:
java.io.IOException

handleRemoveAll

public void handleRemoveAll(java.lang.String cacheName)
                     throws java.io.IOException
Description of the Method

Specified by:
handleRemoveAll in interface ICacheListener
Throws:
java.io.IOException

handleDispose

public void handleDispose(java.lang.String cacheName)
                   throws java.io.IOException
Description of the Method

Specified by:
handleDispose in interface ICacheListener
Throws:
java.io.IOException