GigaSpaces XAP 7.0 API

org.openspaces.core.executor.support
Class MaxReducer<T extends Number>

java.lang.Object
  extended by org.openspaces.core.executor.support.MaxReducer<T>
All Implemented Interfaces:
AsyncResultsReducer<T,T>

public class MaxReducer<T extends Number>
extends Object
implements AsyncResultsReducer<T,T>

A default implementation of a reducer that returnt the maximum of T.

Author:
kimchy

Constructor Summary
MaxReducer(Class<T> reduceType)
           
 
Method Summary
 MaxReducer ignoreExceptions()
          Causes the reducer to ignore exceptions and just sum the results that succeeded.
 T reduce(List<AsyncResult<T>> results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxReducer

public MaxReducer(Class<T> reduceType)
           throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

ignoreExceptions

public MaxReducer ignoreExceptions()
Causes the reducer to ignore exceptions and just sum the results that succeeded.


reduce

public T reduce(List<AsyncResult<T>> results)
                        throws Exception
Specified by:
reduce in interface AsyncResultsReducer<T extends Number,T extends Number>
Throws:
Exception

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.