<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" 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"> | |
<bean class="org.apache.ignite.cache.store.cassandra.datasource.DataSource" name="cassandra"> | |
<property name="contactPoints" value="localhost" /> | |
</bean> | |
<bean class="org.apache.ignite.configuration.IgniteConfiguration"> | |
<property name="cacheConfiguration"> | |
<list> | |
<bean class="org.apache.ignite.configuration.CacheConfiguration"> | |
<property name="sqlSchema" value="address_by_customer_id" /> | |
<property name="name" value="AddressByCustomerId" /> | |
<property name="writeThrough" value="true" /> | |
<property name="readThrough" value="true" /> | |
<property name="indexedTypes"> | |
<list> | |
<value type="java.lang.Class">com.fexco.brw.tables.AddressByCustomerIdPK</value> | |
<value type="java.lang.Class">com.fexco.brw.tables.AddressByCustomerId</value> | |
</list> | |
</property> | |
<property name="cacheStoreFactory"> | |
<bean class="org.apache.ignite.cache.store.cassandra.CassandraCacheStoreFactory"> | |
<property name="dataSource" ref="cassandra" /> | |
<property name="persistenceSettings"> | |
<bean class="org.apache.ignite.cache.store.cassandra.persistence.KeyValuePersistenceSettings"> | |
<constructor-arg type="java.lang.String"> | |
<value><![CDATA[ | |
<persistence keyspace="newpos" table="address_by_customer_id"> | |
<keyPersistence class="com.fexco.brw.tables.AddressByCustomerIdPK" strategy="POJO" > | |
<partitionKey> | |
<!-- Mapping from POJO field to Cassandra table column --> | |
<field name="customerId" column="customer_id" /> | |
<!--<field name="location_id" column="location_id" />--> | |
</partitionKey> | |
<!-- Cluster key fields if POJO strategy used --> | |
<clusterKey> | |
<!-- Mapping from POJO field to Cassandra table column --> | |
<field name="addressId" column=" address_id" /> | |
<!--<field name="create_time" column="create_time" sort="desc"/>--> | |
</clusterKey> | |
</keyPersistence> | |
<valuePersistence class="com.fexco.brw.tables.AddressByCustomerId" strategy="POJO" | |
serializer="org.apache.ignite.cache.store.cassandra.serializer.KryoSerializer"> | |
<!-- Mapping from POJO field to Cassandra table column --> | |
<!-- <field name="firstName" column="first_name" /> --> | |
<field name="customerId" column="customer_id" /> | |
<field name="addressId" column="address_id" /> | |
<field name="address1" column="address1" /> | |
<field name="address2" column="address2" /> | |
<field name="address3" column="address3" /> | |
<field name="addressType" column="address_type" /> | |
<field name="city" column="city" /> | |
<field name="country" column="country" /> | |
<field name="county" column="county" /> | |
<field name="postcode" column="postcode" /> | |
</valuePersistence> | |
</persistence> | |
]]></value> | |
</constructor-arg> | |
</bean> | |
</property> | |
</bean> | |
</property> | |
</bean> | |
</list> | |
</property> | |
<property name="clientMode" value="true" /> | |
<property name="discoverySpi"> | |
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> | |
<property name="ipFinder"> | |
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.kubernetes.TcpDiscoveryKubernetesIpFinder" /> | |
</property> | |
</bean> | |
</property> | |
</bean> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment