Package net.sf.ehcache.distribution
Interface CacheManagerPeerListener
-
- All Superinterfaces:
CacheManagerEventListener
- All Known Implementing Classes:
RMICacheManagerPeerListener
public interface CacheManagerPeerListener extends CacheManagerEventListener
A listener for updates, which controls remote cache peers.- Version:
- $Id$
- Author:
- Greg Luck
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattemptResolutionOfUniqueResourceConflict()If a conflict is detected in unique resource use, this method signals the listener to attempt automatic resolution of the resource conflict.java.util.ListgetBoundCachePeers()All of the caches which are listening for remote changes.java.lang.StringgetScheme()The replication scheme this listener interacts with.java.lang.StringgetUniqueResourceIdentifier()A listener will normally have a resource that only one instance can use at the same time, such as a port.-
Methods inherited from interface net.sf.ehcache.event.CacheManagerEventListener
dispose, getStatus, init, notifyCacheAdded, notifyCacheRemoved
-
-
-
-
Method Detail
-
getBoundCachePeers
java.util.List getBoundCachePeers()
All of the caches which are listening for remote changes.- Returns:
- a list of
CachePeerobjects
-
getUniqueResourceIdentifier
java.lang.String getUniqueResourceIdentifier()
A listener will normally have a resource that only one instance can use at the same time, such as a port. This identifier is used to tell if it is unique and will not conflict with an existing instance using the resource.- Returns:
- a String identifier for the resource
-
attemptResolutionOfUniqueResourceConflict
void attemptResolutionOfUniqueResourceConflict() throws java.lang.IllegalStateException, CacheExceptionIf a conflict is detected in unique resource use, this method signals the listener to attempt automatic resolution of the resource conflict.- Throws:
java.lang.IllegalStateException- if the statis of the listener is notStatus.STATUS_UNINITIALISEDCacheException
-
getScheme
java.lang.String getScheme()
The replication scheme this listener interacts with. Each peer provider has a scheme name, which can be used by caches to specify for replication and bootstrap purposes.- Returns:
- the well-known scheme name, which is determined by the replication provider author.
-
-