ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xero <mpro...@gmail.com>
Subject RE: Does event listener keep the order of events as they occur on the cluster?
Date Thu, 26 Jul 2018 03:58:45 GMT
Hi,
It is not mandatory to provide a filter. 
For example, this will get all the events from "myCache"

ContinuousQuery<Integer, BinaryObject> qry = new ContinuousQuery<>();
qry.setLocalListener(new MyEventListener());
myCache.withKeepBinary().query(qry);

@IgniteAsyncCallback
private class MyEventListener implements CacheEntryUpdatedListener<Integer,
BinaryObject> {
@Override
 public void onUpdated(Iterable<CacheEntryEvent&lt;? extends Integer, ?
extends BinaryObject>> evts) {
 	// Do what you want here
 }
}



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

Mime
View raw message