Package com.tangosol.util.processor
Class AbstractEvolvableProcessor<K,V,R>
- java.lang.Object
 - 
- com.tangosol.io.AbstractEvolvable
 - 
- com.tangosol.util.processor.AbstractEvolvableProcessor<K,V,R>
 
 
 
- 
- Type Parameters:
 K- the type of the Map entry keyV- the type of the Map entry valueR- the type of value returned by the EntryProcessor
- All Implemented Interfaces:
 Evolvable,EvolvablePortableObject,PortableObject,InvocableMap.EntryProcessor<K,V,R>,Serializable
public abstract class AbstractEvolvableProcessor<K,V,R> extends AbstractEvolvable implements InvocableMap.EntryProcessor<K,V,R>, EvolvablePortableObject
An Evolvable AbstractProcessor that is a partial EntryProcessor implementation that provides the default implementation of theprocessAll(java.util.Set<? extends com.tangosol.util.InvocableMap.Entry<K, V>>)method.- Since:
 - Coherence 14.1.1
 - Author:
 - jf 2019.11.21
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description AbstractEvolvableProcessor() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rprocess(InvocableMap.Entry<K,V> entry)Process a Map.Entry object.Map<K,R>processAll(Set<? extends InvocableMap.Entry<K,V>> setEntries)Process a Set of InvocableMap.Entry objects.- 
Methods inherited from class com.tangosol.io.AbstractEvolvable
getDataVersion, getFutureData, getImplVersion, setDataVersion, setFutureData 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface com.tangosol.io.Evolvable
getDataVersion, getFutureData, getImplVersion, setDataVersion, setFutureData 
- 
Methods inherited from interface com.tangosol.io.pof.PortableObject
readExternal, writeExternal 
 - 
 
 - 
 
- 
- 
Method Detail
- 
process
public R process(InvocableMap.Entry<K,V> entry)
Description copied from interface:InvocableMap.EntryProcessorProcess a Map.Entry object.Note: if this method throws an exception, all modifications to the supplied entry or any other entries retrieved via the
BackingMapContext.getBackingMapEntry(java.lang.Object)API will be rolled back leaving all underlying values unchanged.- Specified by:
 processin interfaceInvocableMap.EntryProcessor<K,V,R>- Parameters:
 entry- the Entry to process- Returns:
 - the result of the processing, if any
 
 
- 
processAll
public Map<K,R> processAll(Set<? extends InvocableMap.Entry<K,V>> setEntries)
Process a Set of InvocableMap.Entry objects. This method is semantically equivalent to:Map mapResults = new ListMap(); for (Iterator iter = setEntries.iterator(); iter.hasNext(); ) { Entry entry = (Entry) iter.next(); mapResults.put(entry.getKey(), process(entry)); } return mapResults;Note: if processAll() call throws an exception, only the entries that were removed from the setEntries would be considered successfully processed and the corresponding changes made to the underlying Map; changes made to the remaining entries or any other entries obtained from
BackingMapContext.getBackingMapEntry(java.lang.Object)will not be processed.- Specified by:
 processAllin interfaceInvocableMap.EntryProcessor<K,V,R>- Parameters:
 setEntries- a Set of InvocableMap.Entry objects to process- Returns:
 - a Map containing the results of the processing, up to one entry for each InvocableMap.Entry that was processed, keyed by the keys of the Map that were processed, with a corresponding value being the result of the processing for each key
 
 
 - 
 
 -