K - the type of the Map entry keyV - the type of the Map entry valueR - the type of value returned by the EntryProcessorpublic abstract class AbstractEvolvableProcessor<K,V,R> extends AbstractEvolvable implements InvocableMap.EntryProcessor<K,V,R>, EvolvablePortableObject
processAll(java.util.Set<? extends com.tangosol.util.InvocableMap.Entry<K, V>>) method.| Constructor and Description |
|---|
AbstractEvolvableProcessor() |
| Modifier and Type | Method and Description |
|---|---|
R |
process(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.
|
getDataVersion, getFutureData, getImplVersion, setDataVersion, setFutureDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadExternal, writeExternalgetDataVersion, getFutureData, getImplVersion, setDataVersion, setFutureDatapublic R process(InvocableMap.Entry<K,V> entry)
InvocableMap.EntryProcessor
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.
process in interface InvocableMap.EntryProcessor<K,V,R>entry - the Entry to processpublic Map<K,R> processAll(Set<? extends InvocableMap.Entry<K,V>> setEntries)
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.
processAll in interface InvocableMap.EntryProcessor<K,V,R>setEntries - a Set of InvocableMap.Entry objects to process