org.apache.jcs.engine
Class CacheAdaptor

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

public class CacheAdaptor
extends Object
implements ICacheListener

Used for Cache-to-Cache messaging purposes. These are used in the balking facades in the lateral and remote caches.


Field Summary
protected  long listenerId
          The unique id of this listener.
 
Constructor Summary
CacheAdaptor(ICache cache)
          Constructor for the CacheAdaptor object
 
Method Summary
 long getListenerId()
          Gets the listenerId attribute of the CacheAdaptor object
 void handleDispose(String cacheName)
          Shutdown call.
 void handlePut(ICacheElement item)
          Puts an item into the cache.
 void handleRemove(String cacheName, Serializable key)
          Removes an item.
 void handleRemoveAll(String cacheName)
          Clears the region.
 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
The unique id of this listener.

Constructor Detail

CacheAdaptor

public CacheAdaptor(ICache cache)
Constructor for the CacheAdaptor object

Parameters:
cache -
Method Detail

setListenerId

public void setListenerId(long id)
                   throws IOException
Sets the listenerId attribute of the CacheAdaptor object

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

getListenerId

public long getListenerId()
                   throws IOException
Gets the listenerId attribute of the CacheAdaptor object

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

handlePut

public void handlePut(ICacheElement item)
               throws IOException
Puts an item into the cache.

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

handleRemove

public void handleRemove(String cacheName,
                         Serializable key)
                  throws IOException
Removes an item.

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

handleRemoveAll

public void handleRemoveAll(String cacheName)
                     throws IOException
Clears the region.

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

handleDispose

public void handleDispose(String cacheName)
                   throws IOException
Shutdown call.

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


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