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(Function function,
long timeout,
TimeUnit unit)
Executes the function instance provided.
|
ResultCollector<OUT,AGG> |
execute(String functionId)
Executes the function using its id.
|
ResultCollector<OUT,AGG> |
execute(String functionId,
long timeout,
TimeUnit unit)
Executes the function using its id with the specified timeout.
|
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(Set<?> filter)
Specifies a data filter of routing objects for selecting the GemFire members to execute the
function on.
|
Execution<IN,OUT,AGG> withFilter(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 functionIllegalArgumentException - if filter passed is null.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 executionIllegalArgumentException - if the input parameter is null@Deprecated Execution<IN,OUT,AGG> withArgs(IN args)
setArguments(Object) insteadFunctionContext.getArguments()args - user data passed to the function executionIllegalArgumentException - 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.rc - The ResultCollector that will receive the resultsIllegalArgumentException - if ResultCollector is nullResultCollectorResultCollector<OUT,AGG> execute(String functionId) throws FunctionException
Function.execute(FunctionContext) is called on the instance retrieved using
FunctionService.getFunction(String) on the executing member.
functionId - id of the function 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 conditionFunctionExceptionResultCollector<OUT,AGG> execute(String functionId, long timeout, TimeUnit unit) throws FunctionException
Function.execute(FunctionContext) is called on the instance retrieved using
FunctionService.getFunction(String) on the executing member.
functionId - id of the function to executetimeout - time to wait for the operation to finish before timing outunit - timeout unitwithCollector(ResultCollector). User has
to use this reference to retrieve results.FunctionExceptionResultCollector<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 conditionFunctionExceptionResultCollector<OUT,AGG> execute(Function function, long timeout, TimeUnit unit) throws FunctionException
Function.execute(FunctionContext) is called on the de-serialized instance on the
executing member.
function - instance to executetimeout - time to wait for the operation to finish before timing outunit - timeout unitwithCollector(ResultCollector). User has
to use this reference to retrieve results.LowMemoryException - if the Function.optimizeForWrite() returns true and there is
a low memory conditionFunctionException