Guest User

Untitled

a guest
May 24th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.74 KB | None | 0 0
  1.  
  2. <bean id="turbines_table_datasource" class="org.postgresql.ds.PGPoolingDataSource">
  3. <property name="serverName" value="localhost"/>
  4. <property name="portNumber" value="5432"/>
  5. <property name="databaseName" value="testdb" />
  6.  
  7. </bean>
  8.  
  9. <bean class="org.apache.ignite.configuration.IgniteConfiguration">
  10. <!-- Enable only some events and leave other ones disabled. -->
  11. <property name="includeEventTypes">
  12. <list>
  13. <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
  14. <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
  15. <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
  16. </list>
  17. </property>
  18.  
  19. <property name="connectorConfiguration">
  20. <bean class="org.apache.ignite.configuration.ConnectorConfiguration">
  21. <property name="jettyPath" value="configuration.xml"/>
  22. </bean>
  23. </property>
  24.  
  25. <property name="CacheStoreSessionListenerFactories">
  26. <list>
  27. <bean class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
  28. <constructor-arg>
  29. <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener">
  30. <!-- Inject external data source. -->
  31. <property name="dataSource">
  32. <bean class="org.postgresql.ds.PGPoolingDataSource">
  33. <property name="serverName" value="localhost"/>
  34. <property name="portNumber" value="5432"/>
  35. <property name="databaseName" value="testdb" />
  36. </bean>
  37. </property>
  38. </bean>
  39. </constructor-arg>
  40. </bean>
  41. </list>
  42. </property>
  43.  
  44.  
  45. <property name="gridName" value="test_cluster"/>
  46. <property name="localHost" value="localhost"/>
  47.  
  48. <property name="cacheConfiguration">
  49. <list>
  50. <bean class="org.apache.ignite.configuration.CacheConfiguration">
  51. <property name="name" value="table_cache"/>
  52. <property name="cacheMode" value="PARTITIONED"/>
  53. <property name="atomicityMode" value="TRANSACTIONAL"/>
  54. <property name="backups" value="0"/>
  55. <property name="startSize" value="#{100 * 1024 * 1024}"/>
  56.  
  57.  
  58. <property name="cacheStoreFactory">
  59. <bean class="javax.cache.configuration.FactoryBuilder" factory-method="factoryOf">
  60. <constructor-arg value="CacheWriteThrough"/>
  61. </bean>
  62. </property>
  63. <property name="readThrough" value="true"/>
  64. <property name="writeThrough" value="true"/>
  65. <property name="statisticsEnabled" value="true"/>
  66. <property name="queryEntities">
  67. <list>
  68. <bean class="org.apache.ignite.cache.QueryEntity">
  69. <property name="keyType" value="MyKey"/>
  70. <property name="valueType" value="MyValue"/>
  71. <property name="fields">
  72. (I don't show it, it is simple configuration)
  73. </property>
  74.  
  75. <property name="indexes">
  76. <list>
  77. <bean class="org.apache.ignite.cache.QueryIndex">
  78. <constructor-arg value="A"/>
  79. </bean>
  80. <bean class="org.apache.ignite.cache.QueryIndex">
  81. <constructor-arg value="B"/>
  82. </bean>
  83. <bean class="org.apache.ignite.cache.QueryIndex">
  84. <constructor-arg value="C"/>
  85. </bean>
  86. <bean class="org.apache.ignite.cache.QueryIndex">
  87. <constructor-arg value="D"/>
  88. </bean>
Add Comment
Please, Sign In to add comment