net.sf.ehcache.distribution

Interface CacheManagerPeerListener

public interface CacheManagerPeerListener extends CacheManagerEventListener

A listener for updates, which controls remote cache peers.

Version: $Id: CacheManagerPeerListener.java 108 2006-06-04 12:44:06Z gregluck $

Author: Greg Luck

Method Summary
voidattemptResolutionOfUniqueResourceConflict()
If a conflict is detected in unique resource use, this method signals the listener to attempt automatic resolution of the resource conflict.
voiddispose()
Stop the listener and free any resources.
ListgetBoundCachePeers()
All of the caches which are listenting for remote changes.
StatusgetStatus()
Returns the listener status.
StringgetUniqueResourceIdentifier()
A listener will normally have a resource that only one instance can use at the same time, such as a port.
voidinit()
Call to start the listeners and do any other network initialisation.

Method Detail

attemptResolutionOfUniqueResourceConflict

public void attemptResolutionOfUniqueResourceConflict()
If a conflict is detected in unique resource use, this method signals the listener to attempt automatic resolution of the resource conflict.

Throws: IllegalStateException if the statis of the listener is not STATUS_UNINITIALISED

dispose

public void dispose()
Stop the listener and free any resources.

Throws: CacheException

getBoundCachePeers

public List getBoundCachePeers()
All of the caches which are listenting for remote changes.

Returns: a list of CachePeer objects

getStatus

public Status getStatus()
Returns the listener status.

getUniqueResourceIdentifier

public 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

init

public void init()
Call to start the listeners and do any other network initialisation.

Throws: CacheException