<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../main/config/ehcache.xsd">

    <cacheManagerEventListenerFactory class="net.sf.ehcache.event.TestCacheManagerEventListenerFactory"
                                      properties="type=counting"/>

    <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
                                     properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=0"/>

    <cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" properties="hostName=localhost"/>

    <defaultCache maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                               replicatePuts=true,
                                               replicateUpdates=true,
                                               replicateUpdatesViaCopy=true,
                                               replicateRemovals=true "/>
    </defaultCache>

    <!-- Sample cache named sampleCache1 -->
    <cache name="sampleCache1" maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                               replicatePuts=true,
                                               replicateUpdates=true,
                                               replicateUpdatesViaCopy=true,
                                               replicateRemovals=true "/>
        <cacheEventListenerFactory class="net.sf.ehcache.event.CountingCacheEventListenerFactory"/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
                                   properties="bootstrapAsynchronously=true,
                                               maximumChunkSizeBytes=5000000"/>
    </cache>

    <!-- Sample cache named sampleCache2. This one has a 10ms cache replication interval. -->
    <cache name="sampleCache2" maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                    replicatePuts=true,
                                    replicatePutsViaCopy=false,
                                    replicateUpdates=true,
                                    replicateUpdatesViaCopy=false,
                                    replicateRemovals=true,
                                    asynchronousReplicationIntervalMillis=10"/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
                                   properties="bootstrapAsynchronously=false,
                                               maximumChunkSizeBytes=5000000"/>
    </cache>

    <!-- Sample cache named sampleCache3. It is set for synchronous replication. -->
    <cache name="sampleCache3" maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=false, replicatePuts=true, replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true "/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory" />
    </cache>

    <!-- Sample cache named sampleCache4. All missing RMICacheReplicatorFactory properties default to true -->
    <cache name="sampleCache4" maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
        <bootstrapCacheLoaderFactory class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
                                   properties="bootstrapAsynchronously=false,
                                               maximumChunkSizeBytes=10000"/>
    </cache>

    <!-- Sample cache names sampleCache5. The missing replicatePuts will default to true -->
    <cache name="sampleCache5" maxElementsInMemory="0" eternal="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true, replicateUpdates=true, replicateUpdatesViaCopy=true, replicateRemovals=true "/>
    </cache>
</ehcache>
