...
Data streamer can be implemented as server or client with respect to the data source and requirments. For example HTTP data streamer that implemented as client can request the data from external web services. On the other hand, HTTP data streamer that implemented as server can process a large number of request from internal micro services.
In order to implement custom data streamer a developer should optionally extend StreamAdapter
class, add functionality related with particular data source and streamer life cycle logic if needed. As mentioned above
wraps StreamAdapter
IgniteDataStreamer
instance and also needs StreamTupleExtractor
instance, that could be provided via constructor or corresponding setters.
The central StreamAdapater
's method is addMessage(T msg)
that just converts message to cache entry using StreamTupleExtractor
and streams entry into cache. This method doesn't block current thread due to the nature of IgniteDataStreamer
.
StreamTupleExtractor
interface expose the extract(T msg)
method that returns a cache entry as Map.Entry<K, V>
instance.
...