| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <beans xmlns="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> |
| <!-- tag::ignite-config[] --> |
| <bean class="org.apache.ignite.configuration.IgniteConfiguration" id="ignite.cfg"> |
| <property name="cacheConfiguration"> |
| <bean class="org.apache.ignite.configuration.CacheConfiguration"> |
| <property name="name" value="Person"/> |
| <!-- Configure query entities --> |
| <property name="queryEntities"> |
| <list> |
| <bean class="org.apache.ignite.cache.QueryEntity"> |
| <!-- Setting the type of the key --> |
| <property name="keyType" value="java.lang.Long"/> |
| |
| <property name="keyFieldName" value="id"/> |
| |
| <!-- Setting type of the value --> |
| <property name="valueType" value="org.apache.ignite.examples.Person"/> |
| |
| <!-- Defining fields that will be either indexed or queryable. |
| Indexed fields are added to the 'indexes' list below.--> |
| <property name="fields"> |
| <map> |
| <entry key="id" value="java.lang.Long"/> |
| <entry key="name" value="java.lang.String"/> |
| <entry key="salary" value="java.lang.Float "/> |
| </map> |
| </property> |
| <!-- Defining indexed fields.--> |
| <property name="indexes"> |
| <list> |
| <!-- Single field (aka. column) index --> |
| <bean class="org.apache.ignite.cache.QueryIndex"> |
| <constructor-arg value="name"/> |
| </bean> |
| <!-- Group index. --> |
| <bean class="org.apache.ignite.cache.QueryIndex"> |
| <constructor-arg> |
| <list> |
| <value>id</value> |
| <value>salary</value> |
| </list> |
| </constructor-arg> |
| <constructor-arg value="SORTED"/> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| <!-- end::ignite-config[] --> |
| </beans> |