<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:p="http://www.springframework.org/schema/p"
	   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"
	   default-lazy-init="true">

	<!-- all beans are lazy to allow the same config to be used between multiple tests -->
	<!-- as there can be only one cache per VM -->
	<bean id="cache" class="org.springframework.data.gemfire.CacheFactoryBean">
		<property name="properties">
			<props>
				<prop key="name">BasicRegionConfig</prop>
				<prop key="mcast-port">0</prop>
				<prop key="log-level">warning</prop>
			</props>
		</property>
	</bean>
	
	<bean id="basic" class="org.springframework.data.gemfire.LocalRegionFactoryBean" p:cache-ref="cache" p:name="basic"/>
	
	<!-- find existing region -->
	<bean id="root" class="org.springframework.data.gemfire.LocalRegionFactoryBean" p:cache-ref="cache"/>
	
	<bean id="listeners" class="org.springframework.data.gemfire.LocalRegionFactoryBean" p:cache-ref="cache" p:name="listeners">
		<property name="cacheListeners">
			<array>
				<bean class="org.springframework.data.gemfire.client.RegionIntegrationTest$CacheList"/>
				<bean class="org.springframework.data.gemfire.client.RegionIntegrationTest$CacheList"/>
			</array>
		</property>
		<property name="cacheLoader"><bean class="org.springframework.data.gemfire.client.RegionIntegrationTest$CacheLoad"/></property>
		<property name="cacheWriter"><bean class="org.springframework.data.gemfire.client.RegionIntegrationTest$CacheWrite"/></property>
	</bean>
	
	<!--  client configurations -->
	<bean id="basic-client" class="org.springframework.data.gemfire.client.ClientRegionFactoryBean" p:cache-ref="cache" 
				p:name="client-region" lazy-init="true" p:pool-name="pool">
		<property name="interests">
			<array>
				<bean class="org.springframework.data.gemfire.client.Interest" p:key="Vlaicu" p:policy="NONE"/>
				<bean class="org.springframework.data.gemfire.client.RegexInterest" p:key=".*" p:policy="KEYS" p:durable="true" p:receive-values="false"/>
			</array>
		</property>
	</bean>
	
	<bean id="pool" class="org.springframework.data.gemfire.client.PoolFactoryBean" p:subscription-enabled="true">
		<property name="servers">
			<bean class="org.springframework.data.gemfire.client.PoolConnection" p:host="localhost" p:port="40404"/>
		</property>
	</bean>
	
	<!-- region with various attributes -->
	<bean id="attr-region" class="org.springframework.data.gemfire.PartitionedRegionFactoryBean" p:cache-ref="cache" lazy-init="true">
		<property name="attributes">
			<bean class="org.springframework.data.gemfire.RegionAttributesFactoryBean" p:initial-capacity="1024">
				<property name="partitionAttributes">
					<bean class="org.springframework.data.gemfire.PartitionAttributesFactoryBean" p:redundant-copies="1" p:local-max-memory="512"/>
				</property>
			</bean>
		</property>
	</bean>
	
</beans>
