apache-ignite
123 строки · 5.2 Кб
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} path-to-this-file/example-cache.xml
25
26When starting Ignite from Java IDE, pass path to this file into Ignition:
27Ignition.start("path-to-this-file/example-benchmark.xml");
28-->
29<beans xmlns="http://www.springframework.org/schema/beans"30xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"31xsi:schemaLocation="32http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">33<!--34Optional description.
35-->
36<description>37Spring file for grid configuration with benchmark.
38</description>39
40<!--41Configuration below demonstrates how to setup caches within grid nodes.
42-->
43<bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">44<property name="peerClassLoadingEnabled" value="false"/>45
46<!-- Set to local host address just for examples. -->47<property name="localHost" value="127.0.0.1"/>48
49<property name="connectorConfiguration">50<bean class="org.apache.ignite.configuration.ConnectorConfiguration">51<property name="port" value="11213"/>52</bean>53</property>54
55<!--<property name="peerClassLoadingEnabled" value="false"/>-->56
57<property name="cacheConfiguration">58<!--59Specify list of cache configurations here. Any property from
60CacheConfiguration interface can be configured here.
61Note that absolutely all configuration properties are optional.
62-->
63<list>64<!--65Partitioned cache example configuration.
66-->
67<bean class="org.apache.ignite.configuration.CacheConfiguration">68<property name="name" value="partitioned"/>69
70<property name="cacheMode" value="PARTITIONED"/>71
72<property name="swapEnabled" value="false"/>73
74<property name="writeSynchronizationMode" value="FULL_ASYNC"/>75
76<property name="nearConfiguration">77<bean class="org.apache.ignite.configuration.NearCacheConfiguration" />78</property>79
80<!--81This shows how to configure number of backups. The below configuration
82sets the number of backups to 1 (which is default).
83-->
84<property name="backups" value="1"/>85</bean>86
87</list>88</property>89
90<!--91Uncomment this to provide TCP discovery SPI (predefined addresses).
92Use the addresses list to provide IP addresses of initial nodes in the grid
93(at least one address must be provided).
94-->
95<property name="discoverySpi">96<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">97<property name="ipFinder">98<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">99<property name="addresses">100<list>101<!--102List all IP/port configurations that potentially
103can be started first in examples. We are assuming
104grid of size 10 or less.
105-->
106<value>127.0.0.1:47500</value>107<value>127.0.0.1:47501</value>108<value>127.0.0.1:47502</value>109<value>127.0.0.1:47503</value>110<value>127.0.0.1:47504</value>111<value>127.0.0.1:47505</value>112<value>127.0.0.1:47506</value>113<value>127.0.0.1:47507</value>114<value>127.0.0.1:47508</value>115<value>127.0.0.1:47509</value>116</list>117</property>118</bean>119</property>120</bean>121</property>122</bean>123</beans>124