org.openspaces.core.executor.support
Class AvgReducer<T extends Number,R extends Number>
java.lang.Object
  
org.openspaces.core.executor.support.SumReducer<T,R>
      
org.openspaces.core.executor.support.AvgReducer<T,R>
- All Implemented Interfaces: 
 - AsyncResultsReducer<T,R>
 
public class AvgReducer<T extends Number,R extends Number>
- extends SumReducer<T,R>
 
A default implementation of a reducer that averages all types T
 into a result R.
- Author:
 
  - kimchy
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
AvgReducer
public AvgReducer(Class<R> reduceType)
           throws IllegalArgumentException
- Throws:
 IllegalArgumentException
ignoreExceptions
public AvgReducer ignoreExceptions()
- Causes the reducer to ignore exceptions and just sum the results that succeeded.
- Overrides:
 ignoreExceptions in class SumReducer<T extends Number,R extends Number>
 
 
 
reduce
public R reduce(List<AsyncResult<T>> results)
                        throws Exception
- Specified by:
 reduce in interface AsyncResultsReducer<T extends Number,R extends Number>- Overrides:
 reduce in class SumReducer<T extends Number,R extends Number>
 
- Throws:
 Exception
 
Copyright © GigaSpaces.