net.sf.ehcache.distribution
public class RMISynchronousCacheReplicator extends Object implements CacheReplicator
Version: $Id: RMISynchronousCacheReplicator.java 191 2006-09-03 22:41:48Z gregluck $
Field Summary | |
---|---|
protected boolean | replicatePuts
Whether to replicate puts. |
protected boolean | replicateRemovals
Whether to replicate removes |
protected boolean | replicateUpdates
Whether to replicate updates. |
protected boolean | replicateUpdatesViaCopy
Whether an update (a put) should be by copy or by invalidation, (a remove).
|
protected Status | status
The status of the replicator. |
Constructor Summary | |
---|---|
RMISynchronousCacheReplicator(boolean replicatePuts, boolean replicateUpdates, boolean replicateUpdatesViaCopy, boolean replicateRemovals)
Constructor for internal and subclass use
|
Method Summary | |
---|---|
boolean | alive()
Checks that the replicator is is STATUS_ALIVE . |
Object | clone()
Creates a clone of this listener. |
void | dispose()
Give the replicator a chance to cleanup and free resources when no longer needed |
boolean | isReplicateUpdatesViaCopy() |
static List | listRemoteCachePeers(Ehcache cache)
Package protected List of cache peers
|
boolean | notAlive()
Asserts that the replicator is active.
|
void | notifyElementEvicted(Ehcache cache, Element element)
Called immediately after an element is evicted from the cache. |
void | notifyElementExpired(Ehcache cache, Element element)
{@inheritDoc }
This implementation does not propagate expiries. |
void | notifyElementPut(Ehcache cache, Element element)
Called immediately after an element has been put into the cache. |
void | notifyElementRemoved(Ehcache cache, Element element)
Called immediately after an attempt to remove an element. |
void | notifyElementUpdated(Ehcache cache, Element element)
Called immediately after an element has been put into the cache and the element already
existed in the cache. |
void | notifyRemoveAll(Ehcache cache)
Called during removeAll to indicate that the all
elements have been removed from the cache in a bulk operation. |
#replicateUpdates
is true.STATUS_ALIVE
Parameters: replicatePuts replicateUpdates replicateUpdatesViaCopy replicateRemovals
STATUS_ALIVE
.Returns: a clone
Throws: CloneNotSupportedException if the listener could not be cloned.
Returns: whether update is through copy or invalidate
Parameters: cache
Returns: a list of CachePeer peers for the given cache, excluding the local peer.
Returns: true if the status is not STATUS_ALIVE
Parameters: cache the cache emitting the notification element the element that has just been evicted
Parameters: cache the cache emitting the notification element the element which was just put into the cache.
Parameters: cache the cache emitting the notification element the element just deleted, or a synthetic element with just the key set if no element was removed.param element just deleted
Parameters: cache the cache emitting the notification element the element which was just put into the cache.
Parameters: cache the cache emitting the notification