net.sf.ehcache.distribution

Interface CacheManagerPeerProvider

public interface CacheManagerPeerProvider

Provides a discovery service to locate CachePeer RMI listener peers for a Cache.

Version: $Id: CacheManagerPeerProvider.java 100 2006-05-30 08:19:29Z gregluck $

Author: Greg Luck

Method Summary
voiddispose()
Providers may be doing all sorts of exotic things and need to be able to clean up on dispose.
longgetTimeForClusterToForm()
Time for a cluster to form.
voidinit()
Notifies providers to initialise themselves.
ListlistRemoteCachePeers(Ehcache cache)
voidregisterPeer(String rmiUrl)
Register a new peer.
voidunregisterPeer(String rmiUrl)
Unregisters a peer.

Method Detail

dispose

public void dispose()
Providers may be doing all sorts of exotic things and need to be able to clean up on dispose.

Throws: CacheException

getTimeForClusterToForm

public long getTimeForClusterToForm()
Time for a cluster to form. This varies considerably, depending on the implementation.

Returns: the time in ms, for a cluster to form

init

public void init()
Notifies providers to initialise themselves.

Throws: CacheException

listRemoteCachePeers

public List listRemoteCachePeers(Ehcache cache)

Returns: a list of CachePeer peers for the given cache, excluding the local peer.

registerPeer

public void registerPeer(String rmiUrl)
Register a new peer.

Parameters: rmiUrl

unregisterPeer

public void unregisterPeer(String rmiUrl)
Unregisters a peer.

Parameters: rmiUrl