Class RMICacheReplicatorFactory
java.lang.Object
net.sf.ehcache.event.CacheEventListenerFactory
com.atlassian.cache.ehcache.replication.rmi.RMICacheReplicatorFactory
public class RMICacheReplicatorFactory
extends net.sf.ehcache.event.CacheEventListenerFactory
A factory for RMI-based
CacheReplicators, using properties. Config lines look like:
<cacheEventListenerFactory class="com.atlassian.cache.ehcache.RMICacheReplicatorFactory" properties=" replicateAsynchronously=true, replicatePuts=true replicateUpdates=true replicateUpdatesViaCopy=true replicateRemovals=true "/>This factory is a copy of the eponymous class from Ehcache, with the exception that any synchronous RMI replicators it creates do not suffer from https://jira.terracotta.org/jira/browse/EHC-683.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intA default for the amount of time the replication thread sleeps after it detects the replicationQueue is empty before checking again.protected static final intA default for the maximum number of operations in an RMI message. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.sf.ehcache.event.CacheEventListenercreateCacheEventListener(Properties properties) Create aCacheEventListenerwhich is also a CacheReplicator.
-
Field Details
-
DEFAULT_ASYNCHRONOUS_REPLICATION_INTERVAL_MILLIS
protected static final int DEFAULT_ASYNCHRONOUS_REPLICATION_INTERVAL_MILLISA default for the amount of time the replication thread sleeps after it detects the replicationQueue is empty before checking again.- See Also:
-
DEFAULT_ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZE
protected static final int DEFAULT_ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZEA default for the maximum number of operations in an RMI message.- See Also:
-
-
Constructor Details
-
RMICacheReplicatorFactory
public RMICacheReplicatorFactory()
-
-
Method Details
-
createCacheEventListener
Create aCacheEventListenerwhich is also a CacheReplicator.The defaults if properties are not specified are:
- replicatePuts=true
- replicatePutsViaCopy=true
- replicateUpdates=true
- replicateUpdatesViaCopy=true
- replicateRemovals=true;
- replicateAsynchronously=true
- asynchronousReplicationIntervalMillis=1000
- Specified by:
createCacheEventListenerin classnet.sf.ehcache.event.CacheEventListenerFactory- Parameters:
properties- implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml e.g.<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" properties=" replicateAsynchronously=true, replicatePuts=true replicateUpdates=true replicateUpdatesViaCopy=true replicateRemovals=true asynchronousReplicationIntervalMillis=1000 "/>- Returns:
- a constructed CacheEventListener
-