You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Raul Kripalani <ra...@apache.org> on 2015/09/04 01:36:29 UTC

Implemented IGNITE-1370 Streamers: Implement multiple tuple extractor

Hi,

I have enhanced the Streaming API with a new StreamMultipleTupleExtractor
to allow users to extract multiple tuples from a single message/event.

I also added a unit test inside the SocketStreamer tests.

Pull request: https://github.com/apache/ignite/pull/67.

My preference would have been to extend the StreamTupleExtractor interface
with a boolean supportsMultiple() method and an Map<K, V> extractMultiple(T
msg) method, but this is impossible to do in Java 7 without breaking the
API. It would have been possible with default methods if we were using Java
8 language features.

As a result, I had to create another interface and add a new field in
StreamAdapter accordingly.

Regards,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk