Top Description Fields Constructors Methods
net.sf.ehcache.distribution

public final Class ManualRMICacheManagerPeerProvider

extends RMICacheManagerPeerProvider
Class Inheritance
Imports
net.sf.ehcache.CacheException, .Ehcache, java.util.ArrayList, .Date, .Iterator, .List, org.slf4j.Logger, .LoggerFactory

A provider of Peer RMI addresses based off manual configuration.

Because there is no monitoring of whether a peer is actually there, the list of peers is dynamically looked up and verified each time a lookup request is made.

Author
Greg Luck
Version
$Id: ManualRMICacheManagerPeerProvider.java 10789 2018-04-26 02:08:13Z adahanne $

Field Summary

Modifier and TypeField and Description
private static final Logger
Inherited from net.sf.ehcache.distribution.RMICacheManagerPeerProvider:
cacheManagerpeerUrls

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

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

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.getTimeForClusterToForm.

Time for a cluster to form.
public final void
init()

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.init.

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.init.

Notifies providers to initialise themselves.
public final synchronized List<E>
public final synchronized void
protected final boolean

Returns:

true if stale
stale
(Date
the date the entry was created
date
)

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.stale.

Whether the entry should be considered stale.
Inherited from net.sf.ehcache.distribution.RMICacheManagerPeerProvider:
disposeextractCacheNamegetCacheManagergetSchemelookupRemoteCachePeerunregisterPeer

Field Detail

LOGback to summary
private static final Logger LOG

Hides net.sf.ehcache.distribution.RMICacheManagerPeerProvider.LOG.

Constructor Detail

ManualRMICacheManagerPeerProviderback to summary
public ManualRMICacheManagerPeerProvider()

Empty constructor.

Method Detail

getTimeForClusterToFormback to summary
public long getTimeForClusterToForm()

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.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 final void init()

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.init.

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.init.

Doc from net.sf.ehcache.distribution.RMICacheManagerPeerProvider.init.

Notifies providers to initialise themselves.

listRemoteCachePeersback to summary
public final synchronized List<E> listRemoteCachePeers(Ehcache cache) throws CacheException

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.listRemoteCachePeers.

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.listRemoteCachePeers.

Returns:List<E>

a list of CachePeer peers, excluding the local peer.

registerPeerback to summary
public final synchronized void registerPeer(String rmiUrl)

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.registerPeer.

Implements net.sf.ehcache.distribution.CacheManagerPeerProvider.registerPeer.

Register a new peer.

staleback to summary
protected final boolean stale(Date date)

Implements abstract net.sf.ehcache.distribution.RMICacheManagerPeerProvider.stale.

Whether the entry should be considered stale.

Manual RMICacheManagerProviders use a static list of urls and are therefore never stale.

Parameters
date:Date

the date the entry was created

Returns:boolean

true if stale