Skip to content

Instantly share code, notes, and snippets.

@danellis
Created January 30, 2018 00:41
Show Gist options
  • Save danellis/6ff4a39f79ba438d29086a1c1ea57972 to your computer and use it in GitHub Desktop.
Save danellis/6ff4a39f79ba438d29086a1c1ea57972 to your computer and use it in GitHub Desktop.
Ignite configuration
<property name="igniteInstanceName" value="livefeeds-dev"/>
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
<property name="addresses">
<list>
<value>127.0.0.1:47500..47510</value>
</list>
</property>
</bean>
</property>
<property name="forceServerMode" value="true"/>
</bean>
</property>
<property name="cacheConfiguration">
<list>
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="products"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="backups" value="2"/>
<property name="readFromBackup" value="true"/>
<property name="partitionLossPolicy" value="READ_WRITE_SAFE"/>
<property name="copyOnRead" value="true"/>
<property name="sqlSchema" value="products"/>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="io.livefeeds.ignite.ProductKey"/>
<property name="valueType" value="io.livefeeds.ignite.Product"/>
<property name="tableName" value="products"/>
<property name="keyFieldName" value="key"/>
<property name="valueFieldName" value="product"/>
<property name="fields">
<map>
<entry key="version" value="java.lang.Long"/>
<entry key="attributes" value="scala.collection.immutable.Map"/>
<entry key="inventoryId" value="java.util.UUID"/>
<entry key="productId" value="java.lang.String"/>
<entry key="key" value="io.livefeeds.ignite.ProductKey"/>
<entry key="product" value="io.livefeeds.ignite.Product"/>
</map>
</property>
<property name="indexes">
<list>
<bean class="org.apache.ignite.cache.QueryIndex">
<property name="name" value="version"/>
<property name="indexType" value="SORTED"/>
<property name="fields">
<map>
<entry key="inventoryId" value="true"/>
<entry key="version" value="true"/>
</map>
</property>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</list>
</property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment