IN
- The type of the argument passed into the function, if anyOUT
- The type of results sent by the functionAGG
- The type of the aggregated result returned by the ResultCollectorpublic interface Execution<IN,OUT,AGG>
Function
. A Context
describes the environment in which the Execution
will take place.
This interface is implemented by GemFire. To obtain an instance of it use
FunctionService
.
FunctionService
,
Function
Modifier and Type | Method and Description |
---|---|
ResultCollector<OUT,AGG> |
execute(Function function)
Executes the function instance provided.
|
ResultCollector<OUT,AGG> |
execute(java.lang.String functionId)
Executes the function using its id
|
Execution<IN,OUT,AGG> |
setArguments(IN args)
Specifies the user data passed to the function when it is executed.
|
Execution<IN,OUT,AGG> |
withArgs(IN args)
Deprecated.
use
setArguments(Object) instead |
Execution<IN,OUT,AGG> |
withCollector(ResultCollector<OUT,AGG> rc)
Specifies the
ResultCollector that will receive the results after the function has been
executed. |
Execution<IN,OUT,AGG> |
withFilter(java.util.Set<?> filter)
Specifies a data filter of routing objects for selecting the GemFire members to execute the
function on.
|
Execution<IN,OUT,AGG> withFilter(java.util.Set<?> filter)
Applicable only for regions with DataPolicy.PARTITION
DataPolicy. If the filter is
null, it will execute on all data of the region.
filter
- Set defining the data filter to be used for executing the functionjava.lang.IllegalArgumentException
- if filter passed is null.java.lang.UnsupportedOperationException
- if not called after
FunctionService.onRegion(org.apache.geode.cache.Region)
Execution<IN,OUT,AGG> setArguments(IN args)
FunctionContext.getArguments()
args
- user data passed to the function executionjava.lang.IllegalArgumentException
- if the input parameter is nullExecution<IN,OUT,AGG> withArgs(IN args)
setArguments(Object)
insteadFunctionContext.getArguments()
args
- user data passed to the function executionjava.lang.IllegalArgumentException
- if the input parameter is nullExecution<IN,OUT,AGG> withCollector(ResultCollector<OUT,AGG> rc)
ResultCollector
that will receive the results after the function has been
executed. Collector will receive results as they are sent from the
Function.execute(FunctionContext)
using ResultSender
.java.lang.IllegalArgumentException
- if ResultCollector
is nullResultCollector
ResultCollector<OUT,AGG> execute(java.lang.String functionId) throws FunctionException
Function.execute(FunctionContext)
is called on the instance retrieved using
FunctionService.getFunction(String)
on the executing member.
withCollector(ResultCollector)
. User has
to use this reference to retrieve results.LowMemoryException
- if the Function.optimizeForWrite()
returns true and there is
a low memory conditionFunctionException
ResultCollector<OUT,AGG> execute(Function function) throws FunctionException
Function.execute(FunctionContext)
is called on the de-serialized instance on the
executing member.
function
- instance to executewithCollector(ResultCollector)
. User has
to use this reference to retrieve results.LowMemoryException
- if the Function.optimizeForWrite()
returns true and there is
a low memory conditionFunctionException