Hi All,
I have a requirement where I need to insert or update values in ElasticSearch
through cache. I have configured the cache as following
<bean id="summaryConfigurationCache"
class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="SummaryCache"/>
<property name="cacheStoreFactory">
<bean
class="javax.cache.configuration.FactoryBuilder$SingletonFactory">
<constructor-arg>
<bean
class="com.cache.store.SummaryCacheStoreAdapter">
</bean>
</constructor-arg>
</bean>
</property>
<property name="writeBehindEnabled" value="true"></property>
<property name="readThrough" value="true"></property>
<property name="writeThrough" value="true"></property>
<property name="cacheMode" value="PARTITIONED"/>
</bean>
In SummaryCacheStoreAdapter class I have overridden load() and writeAll()
method to read and write from ElasticSearch.
In my opinion whenever there is any get/put operation in cache, respective
load/write method will be invoked in CacheStoreAdapter. But it is not happening
in my case. Please correct me if I am wrong.
Could you please suggest what changes are required in cache configuration
defined above.
Thanks