Class OperationAggregator<T,K,R>
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.util.OperationAggregator<T,K,R>
 
- 
- All Implemented Interfaces:
- java.lang.Iterable<AggregationSet<T,K,R>>
 
 public class OperationAggregator<T,K,R> extends java.lang.Object implements java.lang.Iterable<AggregationSet<T,K,R>> The OperationAggregator takes a set of objects, splits them up based on keys determined by a KeyProvider, and then aggregates the results back together in the correct order, after some execution has occured.
 Parameters: T - Request type K - Key type R - Result type
 Usage:- Create new aggregator with correct types.
- Call aggregator.put() with the input list, and a (usually anonymous) implementation of KeyProvider that returns the key for the given input.
- Iterate through the AggregationSet<T,K,R\> now contained in the aggregator, do something.
- Return aggregator.getResults()
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classOperationAggregator.AggregationEntrystatic interfaceOperationAggregator.InputValidator<T,R>The InputValidator provides a way to validate input values before they get to execution.static interfaceOperationAggregator.KeyProvider<T,K>protected classOperationAggregator.ValueEntry
 - 
Constructor SummaryConstructors Constructor Description OperationAggregator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<K>getKeys()java.util.List<R>getResults()java.util.Iterator<AggregationSet<T,K,R>>iterator()voidput(java.util.List<T> values, OperationAggregator.KeyProvider<T,K> provider)voidput(java.util.List<T> values, OperationAggregator.KeyProvider<T,K> provider, OperationAggregator.InputValidator<T,R> validator)
 
- 
- 
- 
Field Detail- 
breakupprotected java.util.Map<K,AggregationSet<T,K,R>> breakup 
 
- 
 - 
Method Detail- 
putpublic void put(java.util.List<T> values, OperationAggregator.KeyProvider<T,K> provider) 
 - 
putpublic void put(java.util.List<T> values, OperationAggregator.KeyProvider<T,K> provider, OperationAggregator.InputValidator<T,R> validator) 
 - 
getResultspublic java.util.List<R> getResults() 
 - 
getKeyspublic java.util.Set<K> getKeys() - Returns:
- The Setof keys that have been provided to this OperationAggregator.
 
 - 
iteratorpublic java.util.Iterator<AggregationSet<T,K,R>> iterator() - Specified by:
- iteratorin interface- java.lang.Iterable<T>
 
 
- 
 
-