Top Description Methods
net.sf.ehcache.distribution

public Interface CacheManagerPeerProvider

Known Direct Subinterfaces
net.sf.ehcache.management.ManagedCacheManagerPeerProvider
Known Direct Implementers
net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider, net.sf.ehcache.distribution.RMICacheManagerPeerProvider
Imports
net.sf.ehcache.CacheException, .Ehcache, java.util.List

Provides a discovery service to locate CachePeer listener peers for a Cache.
Author
Greg Luck
Version
$Id: CacheManagerPeerProvider.java 10789 2018-04-26 02:08:13Z adahanne $

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

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

public String

Returns:

the well-known scheme name, which is determined by the replication provider author.
getScheme
()

The replication scheme.

public long

Returns:

the time in ms, for a cluster to form
getTimeForClusterToForm
()

Time for a cluster to form.

public void
init()

Notifies providers to initialise themselves.

public List<E>

Returns:

a list of CachePeer peers for the given cache, excluding the local peer.
listRemoteCachePeers
(Ehcache cache)

public void
registerPeer(String
Identifies a node in this replication scheme (ex: RMI URL)
nodeId
)

Register a new peer.

public void
unregisterPeer(String
Identifies a node in this replication scheme (ex: RMI URL)
nodeId
)

Unregisters a peer.

Method Detail

disposeback to summary
public void dispose() throws CacheException

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

getSchemeback to summary
public String getScheme()

The replication scheme. Each peer provider has a scheme name, which can be used to specify the scheme for replication and bootstrap purposes. Each CacheReplicator should lookup the provider for its scheme type during replication. Similarly a BootstrapCacheLoader should also look up the provider for its scheme.

Returns:String

the well-known scheme name, which is determined by the replication provider author.

Since
1.6 introduced to permit multiple distribution schemes to be used in the same CacheManager
getTimeForClusterToFormback to summary
public long getTimeForClusterToForm()

Time for a cluster to form. This varies considerably, depending on the implementation.

Returns:long

the time in ms, for a cluster to form

initback to summary
public void init()

Notifies providers to initialise themselves.

listRemoteCachePeersback to summary
public List<E> listRemoteCachePeers(Ehcache cache) throws CacheException
Returns:List<E>

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

registerPeerback to summary
public void registerPeer(String nodeId)

Register a new peer.

Parameters
nodeId:String

Identifies a node in this replication scheme (ex: RMI URL)

unregisterPeerback to summary
public void unregisterPeer(String nodeId)

Unregisters a peer.

Parameters
nodeId:String

Identifies a node in this replication scheme (ex: RMI URL)