org.apache.jcs.engine.behavior
Interface ICacheListener

All Known Subinterfaces:
ILateralCacheListener, IRemoteCacheListener
All Known Implementing Classes:
AbsractRemoteCacheListener, CacheAdaptor, LateralTCPListener, RemoteCacheListener, RemoteHttpClientListener

public interface ICacheListener

Used to receive a cache event notification.

Note: objects which implement this interface are local listeners to cache changes, whereas objects which implement IRmiCacheListener are remote listeners to cache changes.


Method Summary
 long getListenerId()
          Gets the listenerId attribute of the ICacheListener object
 void handleDispose(java.lang.String cacheName)
          Notifies the subscribers for freeing up the named cache.
 void handlePut(ICacheElement item)
          Notifies the subscribers for a cache entry update.
 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 unique identifier of listener home
 

Method Detail

handlePut

void handlePut(ICacheElement item)
               throws java.io.IOException
Notifies the subscribers for a cache entry update.

Parameters:
item -
Throws:
java.io.IOException

handleRemove

void handleRemove(java.lang.String cacheName,
                  java.io.Serializable key)
                  throws java.io.IOException
Notifies the subscribers for a cache entry removal.

Parameters:
cacheName -
key -
Throws:
java.io.IOException

handleRemoveAll

void handleRemoveAll(java.lang.String cacheName)
                     throws java.io.IOException
Notifies the subscribers for a cache remove-all.

Parameters:
cacheName -
Throws:
java.io.IOException

handleDispose

void handleDispose(java.lang.String cacheName)
                   throws java.io.IOException
Notifies the subscribers for freeing up the named cache.

Parameters:
cacheName -
Throws:
java.io.IOException

setListenerId

void setListenerId(long id)
                   throws java.io.IOException
sets unique identifier of listener home

Parameters:
id - The new listenerId value
Throws:
java.io.IOException

getListenerId

long getListenerId()
                   throws java.io.IOException
Gets the listenerId attribute of the ICacheListener object

Returns:
The listenerId value
Throws:
java.io.IOException


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