Implemented IGNITE-1370 Streamers: Implement multiple tuple extractor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Implemented IGNITE-1370 Streamers: Implement multiple tuple extractor

Raul Kripalani
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