Hello, Igniters. Improvement of Continuous Query public API are ready for merge. AFAIK Anton Vinogradov and Yakov Zhdanov are happy with proposed API. [1]
With this improvement we can transform entry on the server node before sending
it to the listener to reduce network utilization.
Example of usage:
```
ContinuousQueryWithTransformer<Long, Value, T> cqwt = new
ContinuousQueryWithTransformer<>();
cqwt.setRemoteTransformerFactory(FactoryBuilder.factoryOf(new IdTransformer()));
CQWTListener lsnr = new CQWTListener();
cqwt.setLocalListener(lsnr);
cache.query(cqwt);
public static class IdTransformer implements IgniteClosure<CacheEntryEvent<?
extends Long, ? extends Value>, Long> {
@Override public Long apply(CacheEntryEvent<? extends Long, ? extends Value>
event) {
return event.getValue().id;
}
}
public static class CQWTListener<Long> implements EventListener<Long> {
@Override public void onUpdated(Iterable<? extends Long> ids) {
for (Long id : ids)
consume(id);
}
}
```
Implementation checked on TC, benchmarks [2][3] passed as well and we’re ready
to merge changes to the master branch.
Any objections?
[1] https://github.com/apache/ignite/pull/2372
[2] https://github.com/nizhikov/ignite-425-benchmark
[3]
https://issues.apache.org/jira/browse/IGNITE-425?focusedCommentId=16353812&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16353812
signature.asc
Description: This is a digitally signed message part
