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.


Field Summary
protected  long listenerId
          Description of the Field
 
Constructor Summary
CacheAdaptor(ICache cache)
          Constructor for the CacheAdaptor object
 
Method Summary
 long getListenerId()
          Gets the listenerId attribute of the CacheAdaptor object
 void handleDispose(java.lang.String cacheName)
          Notifies the subscribers for freeing up the named cache.
 void handlePut(ICacheElement item)
          Puts an item into the cache.
 void handleRemove(java.lang.String cacheName, java.io.Serializable key)
          Notifies the subscribers for a cache entry removal.
 void handleRemoveAll(java.lang.String cacheName)
          Notifies the subscribers for a cache remove-all.
 void setListenerId(long 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

listenerId

protected long 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(long 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 long 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
Puts an item into the cache.

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

handleRemove

public void handleRemove(java.lang.String cacheName,
                         java.io.Serializable key)
                  throws java.io.IOException
Description copied from interface: ICacheListener
Notifies the subscribers for a cache entry removal.

Specified by:
handleRemove in interface ICacheListener
Parameters:
cacheName -
key -
Throws:
java.io.IOException

handleRemoveAll

public void handleRemoveAll(java.lang.String cacheName)
                     throws java.io.IOException
Description copied from interface: ICacheListener
Notifies the subscribers for a cache remove-all.

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

handleDispose

public void handleDispose(java.lang.String cacheName)
                   throws java.io.IOException
Description copied from interface: ICacheListener
Notifies the subscribers for freeing up the named cache.

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


Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.