apache-ignite

Форк
0
/
spring-multicache.xml 
295 строк · 12.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
<!--
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} path-to-this-file/example-cache.xml
25

26
    When starting Ignite from Java IDE, pass path to this file into Ignition:
27
    Ignition.start("path-to-this-file/example-benchmark.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 http://www.springframework.org/schema/beans/spring-beans.xsd
34
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
35
    <!--
36
        Optional description.
37
    -->
38
    <description>
39
        Spring file for grid configuration with benchmark.
40
    </description>
41

42
    <!--
43
        Configuration below demonstrates how to setup a collision and failover SPI's
44
        to enable work stealing from overloaded nodes to underloaded nodes.
45

46
        Note that for job stealing to work, you must always use both,
47
        GridJobStealingCollisionSpi and GridJobStealingFailoverSPI.
48
    -->
49
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
50
        <property name="deploymentMode" value="CONTINUOUS"/>
51

52
        <!-- Set to local host address just for examples. -->
53
        <property name="localHost" value="127.0.0.1"/>
54

55
        <property name="cacheConfiguration">
56
            <!--
57
                Specify list of cache configurations here. Any property from
58
                CacheConfiguration interface can be configured here.
59
                Note that absolutely all configuration properties are optional.
60
            -->
61
            <list>
62
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
63
                    <property name="name" value="partitioned1"/>
64

65
                    <property name="cacheMode" value="PARTITIONED"/>
66

67
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
68

69
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
70

71
                    <property name="rebalanceMode" value="SYNC"/>
72

73
                    <property name="onheapCacheEnabled" value="true"/>
74

75
                    <property name="evictionPolicy">
76
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
77
                            <property name="maxSize" value="100"/>
78
                        </bean>
79
                    </property>
80

81
                    <property name="backups" value="1"/>
82
                </bean>
83

84
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
85
                    <property name="name" value="partitioned2"/>
86

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

89
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
90

91
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
92

93
                    <property name="rebalanceMode" value="SYNC"/>
94

95
                    <property name="onheapCacheEnabled" value="true"/>
96

97
                    <property name="evictionPolicy">
98
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
99
                            <property name="maxSize" value="100"/>
100
                        </bean>
101
                    </property>
102

103
                    <property name="backups" value="1"/>
104
                </bean>
105

106
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
107
                    <property name="name" value="partitioned3"/>
108

109
                    <property name="cacheMode" value="PARTITIONED"/>
110

111
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
112

113
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
114

115
                    <property name="rebalanceMode" value="SYNC"/>
116

117
                    <property name="onheapCacheEnabled" value="true"/>
118

119
                    <property name="evictionPolicy">
120
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
121
                            <property name="maxSize" value="100"/>
122
                        </bean>
123
                    </property>
124

125
                    <property name="backups" value="1"/>
126
                </bean>
127

128
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
129
                    <property name="name" value="partitioned4"/>
130

131
                    <property name="cacheMode" value="PARTITIONED"/>
132

133
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
134

135
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
136

137
                    <property name="rebalanceMode" value="SYNC"/>
138

139
                    <property name="onheapCacheEnabled" value="true"/>
140

141
                    <property name="evictionPolicy">
142
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
143
                            <property name="maxSize" value="100"/>
144
                        </bean>
145
                    </property>
146

147
                    <property name="backups" value="1"/>
148
                </bean>
149

150
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
151
                    <property name="name" value="partitioned5"/>
152

153
                    <property name="cacheMode" value="PARTITIONED"/>
154

155
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
156

157
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
158

159
                    <property name="rebalanceMode" value="SYNC"/>
160

161
                    <property name="onheapCacheEnabled" value="true"/>
162

163
                    <property name="evictionPolicy">
164
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
165
                            <property name="maxSize" value="100"/>
166
                        </bean>
167
                    </property>
168

169
                    <property name="backups" value="1"/>
170
                </bean>
171

172
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
173
                    <property name="name" value="partitioned6"/>
174

175
                    <property name="cacheMode" value="PARTITIONED"/>
176

177
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
178

179
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
180

181
                    <property name="rebalanceMode" value="SYNC"/>
182

183
                    <property name="onheapCacheEnabled" value="true"/>
184

185
                    <property name="evictionPolicy">
186
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
187
                            <property name="maxSize" value="100"/>
188
                        </bean>
189
                    </property>
190

191
                    <property name="backups" value="1"/>
192
                </bean>
193

194
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
195
                    <property name="name" value="partitioned7"/>
196

197
                    <property name="cacheMode" value="PARTITIONED"/>
198

199
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
200

201
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
202

203
                    <property name="rebalanceMode" value="SYNC"/>
204

205
                    <property name="onheapCacheEnabled" value="true"/>
206

207
                    <property name="evictionPolicy">
208
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
209
                            <property name="maxSize" value="100"/>
210
                        </bean>
211
                    </property>
212

213
                    <property name="backups" value="1"/>
214
                </bean>
215

216
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
217
                    <property name="name" value="partitioned8"/>
218

219
                    <property name="cacheMode" value="PARTITIONED"/>
220

221
                    <property name="atomicityMode" value="TRANSACTIONAL"/>
222

223
                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
224

225
                    <property name="rebalanceMode" value="SYNC"/>
226

227
                    <property name="onheapCacheEnabled" value="true"/>
228

229
                    <property name="evictionPolicy">
230
                        <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
231
                            <property name="maxSize" value="100"/>
232
                        </bean>
233
                    </property>
234

235
                    <property name="backups" value="1"/>
236
                </bean>
237
            </list>
238
        </property>
239

240

241
        <!--
242
            Uncomment this to provide TCP discovery SPI (predefined addresses).
243
            Use the addresses list to provide IP addresses of initial nodes in the grid
244
            (at least one address must be provided).
245
        -->
246
        <property name="discoverySpi">
247
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
248
                <property name="ipFinder">
249
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
250
                        <property name="addresses">
251
                            <list>
252
                                <!--
253
                                    List all IP/port configurations that potentially
254
                                    can be started first in examples. We are assuming
255
                                    grid of size 10 or less.
256
                                -->
257
                                <value>127.0.0.1:47500</value>
258
                                <value>127.0.0.1:47501</value>
259
                                <value>127.0.0.1:47502</value>
260
                                <value>127.0.0.1:47503</value>
261
                                <value>127.0.0.1:47504</value>
262
                                <value>127.0.0.1:47505</value>
263
                                <value>127.0.0.1:47506</value>
264
                                <value>127.0.0.1:47507</value>
265
                                <value>127.0.0.1:47508</value>
266
                                <value>127.0.0.1:47509</value>
267
                            </list>
268
                        </property>
269
                    </bean>
270
                </property>
271
            </bean>
272
        </property>
273

274
        <!--
275
            Uncomment to provide custom configuration for executor service.
276
            By default thread pool size is 100.
277
            All threads are pre-started and are available for use.
278
        -->
279
        <property name="publicThreadPoolSize" value="10"/>
280

281
        <!--
282
            Uncomment to provide custom configuration for System executor service.
283
            By default the thread pool size is 5 which should be good enough.
284
            Threads are not started unless used.
285
        -->
286
        <property name="systemThreadPoolSize" value="10"/>
287

288
        <!--
289
            Uncomment to provide custom configuration for P2P executor service.
290
            By default the thread pool size is 20 which should be good enough.
291
            Threads are not started unless used.
292
        -->
293
        <property name="peerClassLoadingThreadPoolSize" value="2"/>
294
    </bean>
295
</beans>
296

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

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

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

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