public class RMICacheReplicatorFactory extends CacheEventListenerFactory
<cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" properties=" replicateAsynchronously=true, replicatePuts=true replicateUpdates=true replicateUpdatesViaCopy=true replicateRemovals=true "/>
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ASYNCHRONOUS_REPLICATION_INTERVAL_MILLIS |
private static java.lang.String |
ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZE |
protected static int |
DEFAULT_ASYNCHRONOUS_REPLICATION_INTERVAL_MILLIS
A default for the amount of time the replication thread sleeps after it detects the replicationQueue is empty
before checking again.
|
protected static int |
DEFAULT_ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZE
A default for the maximum number of operations in an RMI message.
|
private static org.slf4j.Logger |
LOG |
private static int |
MINIMUM_REASONABLE_INTERVAL |
private static java.lang.String |
REPLICATE_ASYNCHRONOUSLY |
private static java.lang.String |
REPLICATE_PUTS |
private static java.lang.String |
REPLICATE_PUTS_VIA_COPY |
private static java.lang.String |
REPLICATE_REMOVALS |
private static java.lang.String |
REPLICATE_UPDATES |
private static java.lang.String |
REPLICATE_UPDATES_VIA_COPY |
Constructor and Description |
---|
RMICacheReplicatorFactory() |
Modifier and Type | Method and Description |
---|---|
CacheEventListener |
createCacheEventListener(java.util.Properties properties)
Create a
CacheEventListener which is also a CacheReplicator. |
protected int |
extractMaximumBatchSize(java.util.Properties properties)
Extracts the value of maximumBatchSize.
|
protected boolean |
extractReplicateAsynchronously(java.util.Properties properties)
Extracts the value of replicateAsynchronously from the properties
|
protected boolean |
extractReplicatePuts(java.util.Properties properties)
Extracts the value of replicatePuts from the properties
|
protected boolean |
extractReplicatePutsViaCopy(java.util.Properties properties)
Extracts the value of replicatePutsViaCopy from the properties
|
protected boolean |
extractReplicateRemovals(java.util.Properties properties)
Extracts the value of replicateRemovals from the properties
|
protected boolean |
extractReplicateUpdates(java.util.Properties properties)
Extracts the value of replicateUpdates from the properties
|
protected boolean |
extractReplicateUpdatesViaCopy(java.util.Properties properties)
Extracts the value of replicateUpdatesViaCopy from the properties
|
protected int |
extractReplicationIntervalMilis(java.util.Properties properties)
Extracts the value of asynchronousReplicationIntervalMillis.
|
protected static final int DEFAULT_ASYNCHRONOUS_REPLICATION_INTERVAL_MILLIS
protected static final int DEFAULT_ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZE
private static final org.slf4j.Logger LOG
private static final java.lang.String REPLICATE_PUTS
private static final java.lang.String REPLICATE_PUTS_VIA_COPY
private static final java.lang.String REPLICATE_UPDATES
private static final java.lang.String REPLICATE_UPDATES_VIA_COPY
private static final java.lang.String REPLICATE_REMOVALS
private static final java.lang.String REPLICATE_ASYNCHRONOUSLY
private static final java.lang.String ASYNCHRONOUS_REPLICATION_INTERVAL_MILLIS
private static final java.lang.String ASYNCHRONOUS_REPLICATION_MAXIMUM_BATCH_SIZE
private static final int MINIMUM_REASONABLE_INTERVAL
public final CacheEventListener createCacheEventListener(java.util.Properties properties)
CacheEventListener
which is also a CacheReplicator.
The defaults if properties are not specified are:
createCacheEventListener
in class CacheEventListenerFactory
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
"/>
protected int extractReplicationIntervalMilis(java.util.Properties properties)
properties
- protected int extractMaximumBatchSize(java.util.Properties properties)
properties
- protected boolean extractReplicateAsynchronously(java.util.Properties properties)
properties
- protected boolean extractReplicateRemovals(java.util.Properties properties)
properties
- protected boolean extractReplicateUpdatesViaCopy(java.util.Properties properties)
properties
- protected boolean extractReplicatePutsViaCopy(java.util.Properties properties)
properties
- protected boolean extractReplicateUpdates(java.util.Properties properties)
properties
- protected boolean extractReplicatePuts(java.util.Properties properties)
properties
-