<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:cache="http://www.springframework.org/schema/cache"
	   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 http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/geode http://www.springframework.org/schema/geode/spring-geode.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
  ">

	<util:properties id="gemfireProperties">
		<prop key="name">SpringGemFireCachingIntegrationTest</prop>
		<prop key="mcast-port">0</prop>
		<prop key="log-level">warning</prop>
	</util:properties>

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

	<gfe:region-template id="Template" initial-capacity="51" load-factor="0.75"/>

	<cache:annotation-driven/>

	<bean id="cacheManager" class="org.springframework.data.gemfire.cache.GemfireCacheManager" p:cache-ref="gemfireCache"/>

	<context:annotation-config/>

	<util:map id="NamedNumbersMap" map-class="java.util.concurrent.ConcurrentHashMap"
			  key-type="java.lang.String" value-type="java.lang.Integer">
		<entry key="zero" value="0"/>
		<entry key="one" value="1"/>
		<entry key="two" value="2"/>
		<entry key="three" value="3"/>
		<entry key="four" value="4"/>
		<entry key="five" value="5"/>
		<entry key="size" value="6"/>
		<entry key="seven" value="7"/>
		<entry key="eight" value="8"/>
		<entry key="nine" value="9"/>
	</util:map>

	<bean id="namedNumbersRepo" class="org.springframework.data.gemfire.cache.CachingWithGemFireIntegrationTest$NamedNumbersInMemoryRepository">
		<property name="namedNumbers" ref="NamedNumbersMap"/>
	</bean>

	<bean id="namedNumbersService" class="org.springframework.data.gemfire.cache.CachingWithGemFireIntegrationTest$NamedNumbersService">
		<property name="namedNumbersRepo" ref="namedNumbersRepo"/>
	</bean>

	<beans profile="replica">
		<gfe:replicated-region id="NamedNumbersRegion" persistent="false" key-constraint="java.lang.String"
							   value-constraint="java.lang.Integer" template="Template"/>
	</beans>

	<beans profile="partition">
		<gfe:partitioned-region id="NamedNumbersRegion" persistent="false" key-constraint="java.lang.String"
								value-constraint="java.lang.Integer" template="Template"/>
	</beans>

	<beans profile="local">
		<gfe:partitioned-region id="NamedNumbersRegion" persistent="false" key-constraint="java.lang.String"
								value-constraint="java.lang.Integer" template="Template"/>
	</beans>

</beans>
