apache-ignite
127 строк · 6.1 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4~ Licensed to the Apache Software Foundation (ASF) under one or more
5~ contributor license agreements. See the NOTICE file distributed with
6~ this work for additional information regarding copyright ownership.
7~ The ASF licenses this file to You under the Apache License, Version 2.0
8~ (the "License"); you may not use this file except in compliance with
9~ the License. You may obtain a copy of the License at
10~
11~ http://www.apache.org/licenses/LICENSE-2.0
12~
13~ Unless required by applicable law or agreed to in writing, software
14~ distributed under the License is distributed on an "AS IS" BASIS,
15~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16~ See the License for the specific language governing permissions and
17~ limitations under the License.
18-->
19
20<beans xmlns="http://www.springframework.org/schema/beans"21xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"22xmlns:util="http://www.springframework.org/schema/util"23xsi:schemaLocation="24http://www.springframework.org/schema/beans
25http://www.springframework.org/schema/beans/spring-beans.xsd
26http://www.springframework.org/schema/util
27http://www.springframework.org/schema/util/spring-util.xsd">28<bean abstract="true" id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">29<!-- Set to true to enable distributed class loading for examples, default is false. -->30<property name="peerClassLoadingEnabled" value="true"/>31
32<property name="marshaller">33<bean class="org.apache.ignite.internal.binary.BinaryMarshaller" />34</property>35
36<!-- Enable cache events for examples. -->37<property name="includeEventTypes">38<util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>39</property>40
41<!-- Cache configurations (all properties are optional). -->42<property name="cacheConfiguration">43<list>44<!-- Partitioned cache example configuration (Atomic mode). -->45<bean parent="cache-template">46<property name="name" value="partitioned"/>47<property name="cacheMode" value="PARTITIONED"/>48<property name="atomicityMode" value="ATOMIC"/>49<property name="backups" value="1"/>50
51<property name="indexedTypes">52<list>53<!-- Key and value type for SQL table Long. -->54<value>java.lang.Integer</value>55<value>java.lang.Long</value>56</list>57</property>58</bean>59
60<!-- Partitioned cache example configuration (Atomic mode, PRIMARY write order mode). -->61<bean parent="cache-template">62<property name="name" value="partitioned_primary"/>63<property name="cacheMode" value="PARTITIONED"/>64<property name="atomicityMode" value="ATOMIC"/>65<property name="backups" value="1"/>66</bean>67
68<!-- Partitioned cache example configuration (Transactional mode). -->69<bean parent="cache-template">70<property name="name" value="partitioned_tx"/>71<property name="cacheMode" value="PARTITIONED"/>72<property name="atomicityMode" value="TRANSACTIONAL"/>73<property name="nearConfiguration">74<bean class="org.apache.ignite.configuration.NearCacheConfiguration"/>75</property>76<property name="backups" value="1"/>77</bean>78
79<!-- Replicated cache example configuration (Atomic mode). -->80<bean parent="cache-template">81<property name="name" value="replicated"/>82<property name="cacheMode" value="REPLICATED"/>83<property name="atomicityMode" value="ATOMIC"/>84<property name="indexedTypes">85<list>86<!-- Key and value type for SQL table DimStore. -->87<value>java.lang.Integer</value>88<value>java.lang.Integer</value>89</list>90</property>91</bean>92
93<!-- Replicated cache example configuration (Transactional mode). -->94<bean parent="cache-template">95<property name="name" value="replicated_tx"/>96<property name="cacheMode" value="REPLICATED"/>97<property name="atomicityMode" value="TRANSACTIONAL"/>98</bean>99</list>100</property>101
102<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->103<property name="discoverySpi">104<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">105<property name="ipFinder">106<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">107<property name="addresses">108<list>109<!-- In distributed environment, replace with actual host IP address. -->110<value>127.0.0.1:47500..47509</value>111</list>112</property>113</bean>114</property>115</bean>116</property>117</bean>118
119<!-- Template for all example cache configurations. -->120<bean id="cache-template" abstract="true" class="org.apache.ignite.configuration.CacheConfiguration">121<!-- Set synchronous rebalancing (default is asynchronous). -->122<property name="rebalanceMode" value="SYNC"/>123
124<!-- Set to FULL_SYNC for examples, default is PRIMARY_SYNC. -->125<property name="writeSynchronizationMode" value="FULL_SYNC"/>126</bean>127</beans>128