Package org.apache.commons.jcs3.engine
Class CacheWatchRepairable
java.lang.Object
org.apache.commons.jcs3.engine.CacheWatchRepairable
- All Implemented Interfaces:
- Remote,- ICacheObserver
Intercepts the requests to the underlying ICacheObserver object so that the listeners can be
 recorded locally for remote connection recovery purposes. (Durable subscription like those in JMS
 is not implemented at this stage for it can be too expensive.)
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription<K,V> void addCacheListener(String cacheName, ICacheListener<K, V> obj) Adds a feature to the CacheListener attribute of the CacheWatchRepairable object<K,V> void addCacheListener(ICacheListener<K, V> obj) Adds a feature to the CacheListener attribute of the CacheWatchRepairable object<K,V> void removeCacheListener(String cacheName, ICacheListener<K, V> obj) Tell the server to release us.<K,V> void removeCacheListener(ICacheListener<K, V> obj) Unsubscribes from all caches.voidsetCacheWatch(ICacheObserver cacheWatch) Replaces the underlying cache watch service and re-attaches all existing listeners to the new cache watch.
- 
Constructor Details- 
CacheWatchRepairablepublic CacheWatchRepairable()
 
- 
- 
Method Details- 
setCacheWatchReplaces the underlying cache watch service and re-attaches all existing listeners to the new cache watch.- Parameters:
- cacheWatch- The new cacheWatch value
 
- 
addCacheListenerAdds a feature to the CacheListener attribute of the CacheWatchRepairable object- Specified by:
- addCacheListenerin interface- ICacheObserver
- Parameters:
- cacheName- The feature to be added to the CacheListener attribute
- obj- The feature to be added to the CacheListener attribute
- Throws:
- IOException
 
- 
addCacheListenerAdds a feature to the CacheListener attribute of the CacheWatchRepairable object- Specified by:
- addCacheListenerin interface- ICacheObserver
- Parameters:
- obj- The feature to be added to the CacheListener attribute
- Throws:
- IOException
 
- 
removeCacheListenerpublic <K,V> void removeCacheListener(String cacheName, ICacheListener<K, V> obj) throws IOExceptionTell the server to release us.- Specified by:
- removeCacheListenerin interface- ICacheObserver
- Parameters:
- cacheName-
- obj-
- Throws:
- IOException
 
- 
removeCacheListenerDescription copied from interface:ICacheObserverUnsubscribes from all caches.- Specified by:
- removeCacheListenerin interface- ICacheObserver
- Parameters:
- obj-
- Throws:
- IOException
 
 
-