| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!-- |
| Ignite Spring configuration file to startup grid. |
| --> |
| <beans xmlns="http://www.springframework.org/schema/beans" |
| 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/util |
| http://www.springframework.org/schema/util/spring-util.xsd"> |
| <!-- |
| Store data source. |
| --> |
| <bean id="storeDataSource" class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStore"> |
| <property name="dataSource"> |
| <bean class="org.h2.jdbcx.JdbcConnectionPool" factory-method="create"> |
| <constructor-arg value="jdbc:h2:tcp://localhost/store-benchmark/h2-benchmark"/> |
| <constructor-arg value="sa"/> |
| <constructor-arg value=""/> |
| </bean> |
| </property> |
| </bean> |
| |
| <bean id="sampleTypeMetadata" class="org.apache.ignite.cache.CacheTypeMetadata"> |
| <property name="databaseTable" value="SAMPLE"/> |
| <property name="keyType" value="org.apache.ignite.yardstick.cache.model.SampleKey"/> |
| <property name="valueType" value="org.apache.ignite.yardstick.cache.model.SampleValue"/> |
| <property name="keyFields"> |
| <list> |
| <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata"> |
| <property name="databaseName" value="ID"/> |
| <property name="databaseType"> |
| <util:constant static-field="java.sql.Types.INTEGER"/> |
| </property> |
| <property name="javaName" value="id"/> |
| <property name="javaType" value="int"/> |
| </bean> |
| </list> |
| </property> |
| <property name="valueFields"> |
| <list> |
| <bean class="org.apache.ignite.cache.CacheTypeFieldMetadata"> |
| <property name="databaseName" value="VALUE"/> |
| <property name="databaseType"> |
| <util:constant static-field="java.sql.Types.INTEGER"/> |
| </property> |
| <property name="javaName" value="id"/> |
| <property name="javaType" value="int"/> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| |
| <bean class="org.apache.ignite.configuration.IgniteConfiguration" > |
| <property name="peerClassLoadingEnabled" value="false"/> |
| |
| <property name="cacheConfiguration"> |
| <list> |
| <bean class="org.apache.ignite.configuration.CacheConfiguration"> |
| <property name="name" value="atomic"/> |
| |
| <property name="cacheMode" value="PARTITIONED"/> |
| |
| <property name="atomicityMode" value="ATOMIC"/> |
| |
| <property name="swapEnabled" value="false"/> |
| |
| <property name="typeMetadata"> |
| <list> |
| <ref bean="sampleTypeMetadata"/> |
| </list> |
| </property> |
| |
| <property name="cacheStoreFactory"> |
| <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory"> |
| <constructor-arg ref="storeDataSource"/> |
| </bean> |
| </property> |
| </bean> |
| |
| <bean class="org.apache.ignite.configuration.CacheConfiguration"> |
| <property name="name" value="tx"/> |
| |
| <property name="cacheMode" value="PARTITIONED"/> |
| |
| <property name="atomicityMode" value="TRANSACTIONAL"/> |
| |
| <property name="swapEnabled" value="false"/> |
| |
| <property name="typeMetadata"> |
| <list> |
| <ref bean="sampleTypeMetadata"/> |
| </list> |
| </property> |
| |
| <property name="cacheStoreFactory"> |
| <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory"> |
| <constructor-arg ref="storeDataSource"/> |
| </bean> |
| </property> |
| </bean> |
| </list> |
| </property> |
| |
| <property name="connectorConfiguration"><null/></property> |
| |
| <property name="includeEventTypes"> |
| <list/> |
| </property> |
| |
| <property name="loadBalancingSpi"> |
| <bean class="org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi"> |
| <property name="perTask" value="false"/> |
| </bean> |
| </property> |
| |
| <property name="localHost" value="127.0.0.1"/> |
| |
| <property name="discoverySpi"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> |
| <property name="ipFinder"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> |
| <property name="addresses"> |
| <list> |
| <value>127.0.0.1:47500</value> |
| <value>127.0.0.1:47501</value> |
| <value>127.0.0.1:47502</value> |
| <value>127.0.0.1:47503</value> |
| <value>127.0.0.1:47504</value> |
| <value>127.0.0.1:47505</value> |
| <value>127.0.0.1:47506</value> |
| <value>127.0.0.1:47507</value> |
| <value>127.0.0.1:47508</value> |
| <value>127.0.0.1:47509</value> |
| </list> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| </beans> |