ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matt <goodie...@gmail.com>
Subject Re: loadAll and removeAll from cache with custom store
Date Fri, 22 Dec 2017 14:19:19 GMT
Hi,

The size in my store is about 9k. I do have loadAll() working now, so once
that completes, the cache has 9k items as well.

For deleteAll(), I had it work once where it called my adapter multiple
times with all of the expected keys. But then restarting my app and trying
again (after loading new data) it didn't work at all. Do I need to loadAll()
into my Ignite cache before I can delete everything from the backend store?

Here's my configuration:

String name = "foo";

CacheConfiguration<String, IgniteFetchItem> cacheConfig = new
CacheConfiguration<>();
    cacheConfig.setName(name);
    cacheConfig.setCacheMode(CacheMode.PARTITIONED);
    cacheConfig.setBackups(2);
   
cacheConfig.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
    cacheConfig.setAtomicityMode(CacheAtomicityMode.ATOMIC);

    cacheConfig.setWriteBehindEnabled(true);
    cacheConfig.setWriteBehindBatchSize(512);
    cacheConfig.setWriteBehindFlushSize(10240);
    cacheConfig.setWriteBehindFlushFrequency(5_000);

    cacheConfig.setCacheStoreFactory(new
MyCacheStoreAdapter.MyCacheStoreFactory(name));
    cacheConfig.setReadThrough(true);
    cacheConfig.setWriteThrough(true);



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message