Som, You could create the continuous query on each client node with the filter described above.
2018-02-08 19:55 GMT+03:00 Som Som <[email protected]>: > i've got both client and server nodes on each of 3 physical servers, that > is my cluster. there is a partitioned cache, each server node stores only a > part of keys. i start the application on my dev machine that app is also > client of the cluster further i put new key into the cluster. i would like > to see this change only in client which is located with server node which > stores this new key. > > 8 февр. 2018 г. 11:41 ДП пользователь "dkarachentsev" < > [email protected]> написал: > > Hi, > > You may fuse filter for that, for example: > > ContinuousQuery<Integer, Integer> qry = new ContinuousQuery<>(); > > fine al Set<ClusterNode> nodes = new > HashSet<>(client.cluster().forDataNodes("cache") > .forHost(client.cluster().localNode()).nodes()); > > qry.setRemoteFilterFactory(new > Factory<CacheEntryEventFilter<Integer, Integer>>() { > @Override public CacheEntryEventFilter<Integer, Integer> > create() { > return new CacheEntryEventFilter<Integer, Integer>() { > @IgniteInstanceResource > private Ignite ignite; > > @Override public boolean evaluate( > CacheEntryEvent<? extends Integer, ? extends > Integer> event) throws CacheEntryListenerException { > // Server nodes on current host > return nodes.contains(ignite.cluster( > ).localNode()); > } > }; > } > }); > > Thanks! > -Dmitry > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ > > > -- Regards Pavel Vinokurov
