Package org.apache.ignite.stream
Class StreamTransformer<K,V>
- java.lang.Object
- 
- org.apache.ignite.stream.StreamTransformer<K,V>
 
- 
- All Implemented Interfaces:
- Serializable,- javax.cache.processor.EntryProcessor<K,V,Object>,- StreamReceiver<K,V>
 
 public abstract class StreamTransformer<K,V> extends Object implements StreamReceiver<K,V>, javax.cache.processor.EntryProcessor<K,V,Object> Convenience adapter to transform update existing values in streaming cache based on the previously cached value.This transformer implement EntryProcessorand internally will callIgniteCache.invoke(Object, EntryProcessor, Object...)method. Note that the value received from the data streamer will be passed to the entry processor as an argument.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description StreamTransformer()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
 StreamTransformer<K,V>from(CacheEntryProcessor<K,V,Object> ep)Creates a new transformer based on instance ofCacheEntryProcessor.voidreceive(IgniteCache<K,V> cache, Collection<Map.Entry<K,V>> entries)Updates cache with batch of entries.
 
- 
- 
- 
Method Detail- 
receivepublic void receive(IgniteCache<K,V> cache, Collection<Map.Entry<K,V>> entries) throws IgniteException Updates cache with batch of entries.- Specified by:
- receivein interface- StreamReceiver<K,V>
- Parameters:
- cache- Cache.
- entries- Collection of entries.
- Throws:
- IgniteException- If failed.
 
 - 
frompublic static <K,V> StreamTransformer<K,V> from(CacheEntryProcessor<K,V,Object> ep) Creates a new transformer based on instance ofCacheEntryProcessor.- Type Parameters:
- K- Cache key type.
- V- Cache value type.
- Parameters:
- ep- Entry processor.
- Returns:
- Stream transformer.
 
 
- 
 
-