I dont understand why you need to define receiver to update value in the
cache. streamer does is for you. you just need to write something like this

try (IgniteDataStreamer<Long, Integer> streamer =
ignite.dataStreamer("cacheName")) {

        for(Entry<Long, Integer> entry : maps.entrySet()){ 
        stmr.addData(entry.getKey().longValue(),entry.getValue()); 
        } 
}

datastreamer will flush the data to cache as soon as try with resources is
completed. you don't even need to flush manually 



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

Reply via email to