public abstract class StreamTransformer<K,V> extends Object implements StreamReceiver<K,V>, javax.cache.processor.EntryProcessor<K,V,Object>
This transformer implement EntryProcessor
and internally will call
IgniteCache.invoke(Object, EntryProcessor, Object...)
method. Note
that the value received from the data streamer will be passed to the entry
processor as an argument.
Constructor and Description |
---|
StreamTransformer() |
Modifier and Type | Method and Description |
---|---|
static <K,V> StreamTransformer<K,V> |
from(CacheEntryProcessor<K,V,Object> ep)
Creates a new transformer based on instance of
CacheEntryProcessor . |
void |
receive(IgniteCache<K,V> cache,
Collection<Map.Entry<K,V>> entries)
Updates cache with batch of entries.
|
public void receive(IgniteCache<K,V> cache, Collection<Map.Entry<K,V>> entries) throws IgniteException
receive
in interface StreamReceiver<K,V>
cache
- Cache.entries
- Collection of entries.IgniteException
- If failed.public static <K,V> StreamTransformer<K,V> from(CacheEntryProcessor<K,V,Object> ep)
CacheEntryProcessor
.ep
- Entry processor.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024