Hello!

Yes, as it was mentioned on the list, it is not going to replace already
existing keys' values.

Regards,
-- 
Ilya Kasnacheev


ср, 13 мая 2020 г. в 08:01, Akash Shinde <[email protected]>:

> Hi,
> My question is specifically for clo.apply(key, data)  that I invoked in 
> CacheStoreAdapter.loadCache
> method.
> So, does this method (clo.apply) overrides value for the keys which are
> already present in cache or it just skips?
> My observation is that its not overriding value for the keys which are
> already present and adding data for only new keys.
>
> Thanks,
> Akash
>
> On Wed, May 13, 2020 at 1:15 AM akorensh <[email protected]> wrote:
>
>> Hi,
>> 1)  loadCache() is implementation dependent, by default it just adds new
>> records to the cache .
>>   see example:
>>
>> https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheLoadOnlyStoreExample.java
>>
>>
>>   Take a look at jdbc example as well:
>>
>> https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcStoreExample.java
>>
>>   more info:
>> https://apacheignite.readme.io/docs/data-loading#ignitecacheloadcache
>>
>> 2) You do not need to clear the cache in order to call loadCache
>>
>> 3)  This is implementation dependent.   By default it does not overwrite
>> existing entries.
>>
>> you can experiment w/the above examples by putting:
>>   cache.put(1L,new Person(1L,"A", "B") ) before the loadCache() statement
>> to
>> get a better feel for its behavior.
>>
>> Thanks, Alex
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>

Reply via email to