| <?xml version="1.0" encoding="UTF-8"?> |
| <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> |