apache-ignite
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--
4Licensed to the Apache Software Foundation (ASF) under one or more
5contributor license agreements. See the NOTICE file distributed with
6this work for additional information regarding copyright ownership.
7The 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
9the License. You may obtain a copy of the License at
10
11http://www.apache.org/licenses/LICENSE-2.0
12
13Unless required by applicable law or agreed to in writing, software
14distributed under the License is distributed on an "AS IS" BASIS,
15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16See the License for the specific language governing permissions and
17limitations under the License.
18-->
19
20<!--
21Ignite Spring configuration file to startup grid cache.
22
23When starting a standalone Ignite node, you need to execute the following command:
24{IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml
25
26When starting Ignite from Java IDE, pass path to this file to Ignite:
27Ignition.start("examples/config/example-cache.xml");
28-->
29<beans xmlns="http://www.springframework.org/schema/beans"30xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"31xmlns:util="http://www.springframework.org/schema/util"32xsi:schemaLocation="33http://www.springframework.org/schema/beans
34http://www.springframework.org/schema/beans/spring-beans.xsd
35http://www.springframework.org/schema/util
36http://www.springframework.org/schema/util/spring-util.xsd">37<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">38<property name="connectorConfiguration"><null/></property>39
40<!-- Set to local host address just for examples. -->41<property name="localHost" value="127.0.0.1"/>42
43<!-- Set to true to enable grid-aware class loading for examples, default is false. -->44<property name="peerClassLoadingEnabled" value="true"/>45
46<property name="marshaller">47<bean class="org.apache.ignite.internal.binary.BinaryMarshaller" />48</property>49
50<!-- Enable cache events for examples. -->51<property name="includeEventTypes">52<util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>53</property>54
55<!-- Cache configurations (all properties are optional). -->56<property name="cacheConfiguration">57<list>58<!-- Partitioned cache example configuration (Atomic mode). -->59<bean parent="cache-template">60<property name="name" value="partitioned"/>61<property name="cacheMode" value="PARTITIONED"/>62<property name="atomicityMode" value="ATOMIC"/>63<property name="backups" value="1"/>64</bean>65
66<!-- Partitioned cache example configuration (Transactional mode). -->67<bean parent="cache-template">68<property name="name" value="partitioned_tx"/>69<property name="cacheMode" value="PARTITIONED"/>70<property name="atomicityMode" value="TRANSACTIONAL"/>71<property name="backups" value="1"/>72<property name="nearConfiguration">73<bean class="org.apache.ignite.configuration.NearCacheConfiguration">74</bean>75</property>76</bean>77
78<!-- Replicated cache example configuration (Atomic mode). -->79<bean parent="cache-template">80<property name="name" value="replicated"/>81<property name="cacheMode" value="REPLICATED"/>82<property name="atomicityMode" value="ATOMIC"/>83</bean>84
85<!-- Replicated cache example configuration (Transactional mode). -->86<bean parent="cache-template">87<property name="name" value="replicated_tx"/>88<property name="cacheMode" value="REPLICATED"/>89<property name="atomicityMode" value="TRANSACTIONAL"/>90</bean>91</list>92</property>93
94<property name="dataStorageConfiguration">95<bean class="org.apache.ignite.configuration.DataStorageConfiguration">96<property name="defaultDataRegionConfiguration">97<bean class="org.apache.ignite.configuration.DataRegionConfiguration">98<property name="maxSize" value="#{200L*1024*1024}"/>99</bean>100</property>101</bean>102</property>103
104<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->105<property name="discoverySpi">106<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">107<property name="ipFinder">108<!-- Uncomment multicast IP finder to enable multicast-based discovery of initial nodes. -->109<!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">-->110<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">111<property name="addresses">112<list>113<!-- In distributed environment, replace with actual host IP address. -->114<value>127.0.0.1:47500..47509</value>115</list>116</property>117</bean>118</property>119</bean>120</property>121</bean>122
123<!-- Template for all example cache configurations. -->124<bean id="cache-template" abstract="true" class="org.apache.ignite.configuration.CacheConfiguration">125<!-- Set synchronous rebalancing (default is asynchronous). -->126<property name="rebalanceMode" value="SYNC"/>127
128<!-- Set to FULL_SYNC for examples, default is PRIMARY_SYNC. -->129<property name="writeSynchronizationMode" value="FULL_SYNC"/>130</bean>131</beans>132
133