<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:context="http://www.springframework.org/schema/context"
	   xmlns:gfe="http://www.springframework.org/schema/geode"
	   xmlns:p="http://www.springframework.org/schema/p"
	   xmlns:util="http://www.springframework.org/schema/util"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xsi:schemaLocation="
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
		http://www.springframework.org/schema/geode https://www.springframework.org/schema/geode/spring-geode.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
" default-lazy-init="true">

	<util:properties id="gemfireProperties">
		<prop key="name">ReplicatedNamespaceConfig</prop>
		<prop key="log-level">error</prop>
		<prop key="off-heap-memory-size">64m</prop>
	</util:properties>

	<gfe:cache properties-ref="gemfireProperties"/>

	<gfe:replicated-region id="simple" concurrency-checks-enabled="false" concurrency-level="13" close="false"/>

	<gfe:replicated-region id="pub" name="publisher" scope="DISTRIBUTED_ACK"/>

	<gfe:replicated-region id="complex" close="true" destroy="false">
		<gfe:cache-listener>
            <ref bean="c-listener"/>
			<bean class="org.springframework.data.gemfire.SimpleCacheListener"/>
		</gfe:cache-listener>
		<gfe:cache-loader ref="c-loader"/>
		<gfe:cache-writer ref="c-writer"/>
	</gfe:replicated-region>

	<bean id="c-listener" class="org.springframework.data.gemfire.SimpleCacheListener"/>
	<bean id="c-loader" class="org.springframework.data.gemfire.SimpleCacheLoader"/>
	<bean id="c-writer" class="org.springframework.data.gemfire.SimpleCacheWriter"/>

    <gfe:replicated-region id="replicated-with-attributes"
						   cloning-enabled="false"
						   concurrency-level="10"
						   disk-synchronous="true"
						   enable-async-conflation="true"
						   enable-subscription-conflation="true"
						   ignore-jta="true"
						   index-update-type="asynchronous"
						   initial-capacity="10"
						   is-lock-grantor="true"
						   key-constraint="java.lang.String"
						   load-factor="0.5"
						   multicast-enabled="true"
						   off-heap="true"
						   scope="global"
						   value-constraint="java.lang.String"/>

	<util:properties id="regionConfigurationSettings">
		<prop key="gemfire.index-update-type">synchronous</prop>
		<prop key="gemfire.scope">distributed-No_ACK</prop>
	</util:properties>

	<context:property-placeholder properties-ref="regionConfigurationSettings"/>

	<gfe:replicated-region id="replicated-with-synchronous-index-updates" index-update-type="${gemfire.index-update-type}"/>

	<gfe:replicated-region id="Compressed" persistent="false" scope="${gemfire.scope}">
		<gfe:compressor ref="testCompressor"/>
	</gfe:replicated-region>

	<bean id="testCompressor" class="org.springframework.data.gemfire.config.xml.ReplicatedRegionNamespaceTest$TestCompressor" p:name="XYZ"/>

	<gfe:lookup-region id="lookup" name="existing"/>

</beans>
