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
.K
- Cache key type.V
- Cache value type.ep
- Entry processor.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.16.0 Release Date : December 15 2023