public class HashMapResultCollector extends Object implements com.gemstone.gemfire.cache.execute.ResultCollector
| Constructor and Description |
|---|
HashMapResultCollector() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResult(com.gemstone.gemfire.distributed.DistributedMember memberID,
Object resultOfSingleExecution)
Adds a single function execution result from a remote node to the
ResultCollector
|
void |
clearResults()
GemFire will invoke this method before re-executing function (in case of
Function Execution HA) This is to clear the previous execution results from
the result collector
|
void |
endResults()
Call back provided to caller, which is called after function execution is
complete and caller can retrieve results using
ResultCollector.getResult() |
Object |
getResult()
Waits if necessary for the computation to complete, and then retrieves its
result.
If Function.hasResult() is false, upon calling
ResultCollector.getResult() throws FunctionException. |
Object |
getResult(long timeout,
TimeUnit unit)
Waits if necessary for at most the given time for the computation to
complete, and then retrieves its result, if available.
|
public void addResult(com.gemstone.gemfire.distributed.DistributedMember memberID,
Object resultOfSingleExecution)
addResult in interface com.gemstone.gemfire.cache.execute.ResultCollectorresultOfSingleExecution - memberID - public Object getResult() throws com.gemstone.gemfire.cache.execute.FunctionException
Function.hasResult() is false, upon calling
ResultCollector.getResult() throws FunctionException.getResult in interface com.gemstone.gemfire.cache.execute.ResultCollectorcom.gemstone.gemfire.cache.execute.FunctionException - if something goes wrong while retrieving the resultpublic void endResults()
ResultCollector.getResult()endResults in interface com.gemstone.gemfire.cache.execute.ResultCollectorpublic Object getResult(long timeout, TimeUnit unit) throws com.gemstone.gemfire.cache.execute.FunctionException
Function.hasResult() is false, upon calling
ResultCollector.getResult() throws FunctionException.getResult in interface com.gemstone.gemfire.cache.execute.ResultCollectortimeout - the maximum time to waitunit - the time unit of the timeout argumentcom.gemstone.gemfire.cache.execute.FunctionException - if something goes wrong while retrieving the resultpublic void clearResults()
clearResults in interface com.gemstone.gemfire.cache.execute.ResultCollectorCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.