ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Kulichenko <valentin.kuliche...@gmail.com>
Subject Transformers in SCAN queries
Date Thu, 04 Feb 2016 05:17:03 GMT

I keep getting requests from our users to add optional transformers to SCAN
queries. This will allow to iterate through cache, but do not transfer
whole key-value pairs across networks (e.g., get only keys). The feature
looks useful and I created a ticket [1].

I am struggling with the design now. The problem is that I wanted to extend
existing ScanQuery object for this, but this seems to be impossible because
it already extends Query<Cache.Entry<K, V>> and thus can iterate only
through entries.

The only option I see now is to create a separate query type, copy-paste
everything from ScanQuery and add *mandatory* transformer. Something like

ScanTransformQuery<K, V, R> extends Query<R> {
    IgniteBiPredicate<K, V> filter;
    IgniteClosure<Cache.Entry<K, V>, R> transformer;
    int part;

Thoughts? Does anyone has other ideas?

[1] https://issues.apache.org/jira/browse/IGNITE-2546


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message