<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:gfe="http://www.springframework.org/schema/geode"
	   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/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">pdxDiskStoreTest</prop>
		<prop key="mcast-port">0</prop>
		<prop key="log-level">warning</prop>
	</util:properties>
	<!--
	  <util:properties id="peerCacheConfigurationSettings" location="classpath:gemfire.properties"/>
	  -->

	<bean id="autoSerializer" class="org.apache.geode.pdx.ReflectionBasedAutoSerializer">
		<constructor-arg type="boolean" value="true"/>
		<constructor-arg>
			<list>
				<value>org.springframework.data.gemfire.PdxDiskStoreIntegrationTest\$KeyHolder</value>
				<value>org.springframework.data.gemfire.PdxDiskStoreIntegrationTest\$ValueHolder</value>
			</list>
		</constructor-arg>
	</bean>

	<!--
		NOTE if the GemFire Disk Stores are declared/defined in the right order inside this Spring application context
		configuration file, then the test passes since the PDX Disk Store gets created before the Data Disk Store that
		is used by the Region to store data with the PDX typed key and value objects.
	  -->

	<!--
	  <gfe:disk-store id="pdxStore" auto-compact="true" compaction-threshold="50" queue-size="50" max-oplog-size="10" time-interval="60000">
		<gfe:disk-dir location="./gemfire/pdx-store" max-size="50"/>
	  </gfe:disk-store>
	  -->

	<gfe:cache properties-ref="gemfireProperties" pdx-serializer-ref="autoSerializer" pdx-persistent="true" pdx-disk-store="pdxStore"/>

	<gfe:disk-store id="dataStore" auto-compact="true" compaction-threshold="75" queue-size="50" max-oplog-size="10" time-interval="600000">
		<gfe:disk-dir location="./gemfire/data-store/" max-size="50"/>
	</gfe:disk-store>

	<gfe:partitioned-region id="pdxDataRegion" name="PdxData" persistent="true" disk-store-ref="dataStore" disk-synchronous="true"/>

	<gfe:disk-store id="pdxStore" auto-compact="true" compaction-threshold="50" queue-size="50" max-oplog-size="10" time-interval="60000">
		<gfe:disk-dir location="./gemfire/pdx-store" max-size="50"/>
	</gfe:disk-store>

	<!--
	  <bean id="pdxDataTemplate" class="org.springframework.data.gemfire.GemfireTemplate" p:region-ref="pdxDataRegion"/>
	  -->

</beans>
