apache-ignite

Форк
0
/
ignite-webapp-config.xml 
253 строки · 11.2 Кб
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
<!--
21
    Ignite Spring configuration file to startup grid cache.
22

23
    When starting a standalone Ignite node, you need to execute the following command:
24
    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/spring-cache.xml
25

26
    When starting Ignite from Java IDE, pass path to this file into Ignition:
27
    Ignition.start("examples/config/spring-cache.xml");
28
-->
29
<beans xmlns="http://www.springframework.org/schema/beans"
30
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31
       xmlns:util="http://www.springframework.org/schema/util"
32
       xsi:schemaLocation="
33
        http://www.springframework.org/schema/beans
34
        http://www.springframework.org/schema/beans/spring-beans.xsd
35
        http://www.springframework.org/schema/util
36
        http://www.springframework.org/schema/util/spring-util.xsd">
37
    <!--
38
        Configuration below demonstrates how to setup caches within grid nodes.
39
    -->
40
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
41
        <property name="deploymentMode" value="SHARED"/>
42

43
        <!--
44
            For better performance set this property to false in case
45
            peer deployment is not used.
46
            Default value is false.
47
        -->
48
        <property name="peerClassLoadingEnabled" value="true"/>
49

50
        <!--
51
            Configure binary marshaller.
52
        -->
53
        <property name="marshaller">
54
            <bean class="org.apache.ignite.internal.binary.BinaryMarshaller" />
55
        </property>
56

57
        <!-- Set to local host address just for examples. -->
58
        <property name="localHost" value="127.0.0.1"/>
59

60
        <!-- Configure REST TCP server address. -->
61
        <property name="connectorConfiguration">
62
            <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
63
                <property name="host" value="127.0.0.1"/>
64
            </bean>
65
        </property>
66

67
        <!--
68
            Enable cache events.
69
        -->
70
        <property name="includeEventTypes">
71
            <util:constant static-field="org.apache.ignite.events.EventType.EVTS_CACHE"/>
72
        </property>
73

74
        <property name="cacheConfiguration">
75
            <!--
76
                Specify list of cache configurations here. Any property from
77
                CacheConfiguration interface can be configured here.
78
                Note that absolutely all configuration properties are optional.
79
            -->
80
            <list>
81
                <!--
82
                    Partitioned cache example configuration (Atomic mode).
83
                -->
84
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
85
                    <property name="name" value="partitioned"/>
86

87
                    <property name="cacheMode" value="PARTITIONED"/>
88

89
                    <!-- Only atomic updates will be supported. -->
90
                    <property name="atomicityMode" value="ATOMIC"/>
91

92
                    <!-- Enable primary sync write mode. -->
93
                    <property name="writeSynchronizationMode" value="PRIMARY_SYNC"/>
94

95
                    <!--
96
                        This shows how to configure number of backups. The below configuration
97
                        sets the number of backups to 1 (which is default).
98
                    -->
99
                    <property name="backups" value="1"/>
100

101
                    <!-- Set synchronous rebalancing (default is asynchronous). -->
102
                    <property name="rebalanceMode" value="SYNC"/>
103
                </bean>
104

105
                <!--
106
                    Partitioned cache example configuration (Transactional mode).
107
                -->
108
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
109
                    <property name="name" value="partitioned_tx"/>
110

111
                    <property name="cacheMode" value="PARTITIONED"/>
112

113
                    <!-- Transactional updates supported. -->
114
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
115

116
                    <!-- Enable near cache to cache recently accessed data. -->
117
                    <property name="nearConfiguration">
118
                        <bean class="org.apache.ignite.configuration.NearCacheConfiguration"/>
119
                    </property>
120

121
                    <!--
122
                        Setting this value will cause local node to wait for remote commits.
123
                        However, it's important to set it this way in the examples as we assert on
124
                        conditions that usually assume full completion of transactions on all nodes.
125
                    -->
126
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
127

128
                    <!--
129
                        This shows how to configure number of backups. The below configuration
130
                        sets the number of backups to 1 (which is default).
131
                    -->
132
                    <property name="backups" value="1"/>
133

134
                    <!-- Set synchronous rebalancing (default is asynchronous). -->
135
                    <property name="rebalanceMode" value="SYNC"/>
136
                </bean>
137

138
                <!--
139
                    Replicated cache example configuration.
140
                -->
141
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
142
                    <property name="name" value="replicated"/>
143

144
                    <!--
145
                        Setting this value will cause local node to wait for remote commits.
146
                        However, it's important to set it this way in the examples as we assert on
147
                        conditions that usually assume full completion of transactions on all nodes.
148
                    -->
149
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
150

151
                    <!-- REPLICATED cache mode. -->
152
                    <property name="cacheMode" value="REPLICATED"/>
153

154
                    <!-- Set synchronous rebalancing (default is asynchronous). -->
155
                    <property name="rebalanceMode" value="SYNC"/>
156
                </bean>
157
            </list>
158
        </property>
159

160
        <!--
161
            Uncomment this to provide TCP discovery SPI (Amazon EC2).
162
        -->
163
        <!--
164
        <property name="discoverySpi">
165
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
166
                <property name="ipFinder">
167
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
168
                        <property name="awsCredentials">
169
                            <bean class="com.amazonaws.auth.BasicAWSCredentials">
170
                                <constructor-arg value="YOUR_ACCESS_KEY_ID" />
171
                                <constructor-arg value="YOUR_SECRET_ACCESS_KEY" />
172
                            </bean>
173
                        </property>
174
                        <property name="bucketName" value="YOUR_BUCKET_NAME_IP_FINDER"/>
175
                    </bean>
176
                </property>
177
            </bean>
178
        </property>
179
        -->
180

181
        <!--
182
            Uncomment this to provide TCP discovery SPI (Local network).
183

184
            If path to shared file system is not explicitly provided,
185
            then only local nodes will be able to discover each other.
186
        -->
187
        <!--
188
        <property name="discoverySpi">
189
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
190
                <property name="ipFinder">
191
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.sharedfs.TcpDiscoverySharedFsIpFinder">
192
                        <property name="path" value="work/disco/tcp"/>
193
                    </bean>
194
                </property>
195
            </bean>
196
        </property>
197
        -->
198

199
        <!--
200
            TCP discovery SPI configuration with predefined addresses.
201
            Use the addresses list to provide IP addresses of initial nodes in the grid
202
            (at least one address must be provided).
203

204
            Note:
205
            =====
206
            If running in distributed environment, you should change IP addresses to the actual IP addresses
207
            of the servers on your network. Not all addresses need to be specified, only the addresses
208
            of one or more servers which will always be started first.
209
        -->
210
        <property name="discoverySpi">
211
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
212
                <property name="ipFinder">
213
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
214
                        <property name="addresses">
215
                            <list>
216
                                <!--
217
                                    List all IP/port configurations that potentially
218
                                    can be started first in examples. We are assuming
219
                                    grid of size 10 or less.
220
                                -->
221
                                <value>127.0.0.1:47500</value>
222
                                <value>127.0.0.1:47501</value>
223
                                <value>127.0.0.1:47502</value>
224
                                <value>127.0.0.1:47503</value>
225
                                <value>127.0.0.1:47504</value>
226
                                <value>127.0.0.1:47505</value>
227
                                <value>127.0.0.1:47506</value>
228
                                <value>127.0.0.1:47507</value>
229
                                <value>127.0.0.1:47508</value>
230
                                <value>127.0.0.1:47509</value>
231
                            </list>
232
                        </property>
233
                    </bean>
234
                    <!--
235
                    Uncomment this to provide IP finder using multicast for nodes discovery.
236
                    In addition to addresses received via multicast this finder can work with pre-configured
237
                    list of addresses.
238
                    -->
239
                    <!--
240
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
241
                        <property name="addresses">
242
                            <list>
243
                                <value>host1:port1</value>
244
                                <value>host2:port2</value>
245
                            </list>
246
                        </property>
247
                    </bean>
248
                    -->
249
                </property>
250
            </bean>
251
        </property>
252
    </bean>
253
</beans>
254

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.