ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kobe <...@mailcity.com>
Subject Re: Relation between CacheStore<K,V> and IgniteCache<K,V>
Date Mon, 14 Mar 2016 05:14:54 GMT
Could anyone please confirm my understanding? That is, if I need to cache
distinct entities (attached to the same hibernate session), I must create
distinct IgniteCache instances?

Regards,

Kobe


Kobe wrote
> Denis,
> 
> I need to cache a collection of objects of different types (a collection
> of campuses &lt;Long, Campus&gt;, collection of &lt;Long, Building&gt;,
> and a collection of residents
> &lt;Long, Resident&gt;). Does this mean I have instantiate three distinct 
> caches 
>           IgniteCache&lt;Long, Campus&gt;,
>           IgniteCache&lt;Long, Building&gt;
> and     Ignite&lt;Long, Resident&gt;
> 
> and attach corresponding CacheStore entities? How would a SQL join across
> these entities work?
> Also, I am using HibernateSessionListener to populate these caches. Is
> there any gotcha I should be
> aware of wrt it?
> 
> thanx,
> 
> /Kobe
> Denis Magda wrote
>> Hi Kobe,
>> 
>> CacheStore is set for every IgniteCache using
>> CacheConfiguration.setCacheStoreFactory(...) method as it's shown in this
>> example [1].
>> 
>> IgniteCache.loadCache(...) parameters can be used to control a subset of
>> data that should be loaded from an underlying persistent storage into a
>> cache.
>> 
>> Also I would recommend to take a look at examples that showcase how the
>> store works in practice [2]
>> 
>> [1]
>> https://apacheignite.readme.io/docs/persistent-store#cachestore-example
>> [2]
>> https://github.com/apache/ignite/tree/master/examples/src/main/java/org/apache/ignite/examples/datagrid/store
>> 
>> On Sat, Mar 12, 2016 at 10:05 AM, Kobe &lt;

>> rk_@

>> &gt; wrote:
>> 
>>>
>>> Hello...
>>>
>>> I am trying to understand how CacheStore behaviour is inserted into
>>> IgniteCache.
>>> I see in the Javadoc of IgniteCache that the loadCache() method passes
>>> optional arguments
>>> to CacheStore.loadCache(). I do not understand this correlation.
>>>
>>> Please explain?
>>>
>>> /Kobe
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-ignite-users.70518.x6.nabble.com/Relation-between-CacheStore-K-V-and-IgniteCache-K-V-tp3471.html
>>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>>





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Relation-between-CacheStore-K-V-and-IgniteCache-K-V-tp3471p3479.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message