Class GemfireOnRegionFunctionTemplate
java.lang.Object
org.springframework.data.gemfire.function.execution.GemfireOnRegionFunctionTemplate
- All Implemented Interfaces:
InitializingBean,GemfireFunctionOperations,GemfireOnRegionOperations
- Author:
- David Turanski, John Blum
- See Also:
-
RegionExecutionFunctionAbstractFunctionTemplateGemfireOnRegionOperations
-
Constructor Summary
ConstructorsConstructorDescriptionGemfireOnRegionFunctionTemplate(Region<?, ?> region) Constructs a new instance of theGemfireOnRegionFunctionTemplateinitialized with the givenRegion. -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> Iterable<T>Execute a GemFire Function registered with the given ID.<T> Iterable<T><T> Iterable<T>Execute an unregistered GemFire Function with the given arguments.protected <T> Iterable<T>execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution) protected <T> Iterable<T>execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution, boolean returnResult) <T> Texecute(GemfireFunctionCallback<T> callback) Execute a GemFire Function using a native GemFireExecutioninstance.<T> TexecuteAndExtract(String functionId, Object... args) Execute a GemFire Function registered with an ID and with an expected singleton result<T> TexecuteAndExtract(String functionId, Set<?> keys, Object... args) <T> TexecuteAndExtract(Function function, Object... args) Execute an unregistered GemFire Function with the expected singleton result.protected <T> TexecuteAndExtract(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution) voidexecuteWithNoResult(String functionId, Object... args) Execute a GemFire Function registered with the given ID having no return value.voidexecuteWithNoResult(String functionId, Set<?> keys, Object... args) protected org.springframework.data.gemfire.function.execution.OnRegionFunctionExecutionprotected Region<?,?> ResultCollector<?,?> longvoidsetResultCollector(ResultCollector<?, ?> resultCollector) voidsetTimeout(long timeout) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.gemfire.function.execution.GemfireFunctionOperations
execute, execute, execute, executeAndExtract, executeAndExtract, executeWithNoResultMethods inherited from interface org.springframework.data.gemfire.function.execution.GemfireOnRegionOperations
execute, executeAndExtract, executeWithNoResult
-
Constructor Details
-
GemfireOnRegionFunctionTemplate
Constructs a new instance of theGemfireOnRegionFunctionTemplateinitialized with the givenRegion.- Parameters:
region-Regionon which theFunctionwill be executed.- Throws:
IllegalArgumentException- ifRegionis null.- See Also:
-
-
Method Details
-
getFunctionExecution
protected org.springframework.data.gemfire.function.execution.OnRegionFunctionExecution getFunctionExecution() -
getRegion
-
execute
- Specified by:
executein interfaceGemfireOnRegionOperations
-
executeAndExtract
- Specified by:
executeAndExtractin interfaceGemfireOnRegionOperations
-
executeWithNoResult
- Specified by:
executeWithNoResultin interfaceGemfireOnRegionOperations
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
Exception
-
execute
Description copied from interface:GemfireFunctionOperationsExecute an unregistered GemFire Function with the given arguments.- Specified by:
executein interfaceGemfireFunctionOperations- Type Parameters:
T- type parameter specifying the result type of the Function execution.- Parameters:
function- the GemFire Function object to execute.args- an array of Object arguments to the Function call.- Returns:
- the contents of the ResultsCollector.
-
executeAndExtract
Description copied from interface:GemfireFunctionOperationsExecute an unregistered GemFire Function with the expected singleton result.- Specified by:
executeAndExtractin interfaceGemfireFunctionOperations- Type Parameters:
T- type parameter specifying the result type of the Function execution.- Parameters:
function- the GemFire Function object.args- an array of Object arguments to the Function call.- Returns:
- the first item in the ResultsCollector.
- See Also:
-
execute
Description copied from interface:GemfireFunctionOperationsExecute a GemFire Function registered with the given ID.- Specified by:
executein interfaceGemfireFunctionOperations- Type Parameters:
T- type parameter specifying the result type of the Function execution.- Parameters:
functionId- the ID under which the GemFire function is registered.args- an array of Object arguments to the Function call.- Returns:
- the results
-
executeAndExtract
Description copied from interface:GemfireFunctionOperationsExecute a GemFire Function registered with an ID and with an expected singleton result- Specified by:
executeAndExtractin interfaceGemfireFunctionOperations- Type Parameters:
T- type parameter specifying the result type of the Function execution.- Parameters:
functionId- the ID under which the GemFire function is registered.args- an array of Object arguments to the Function call.- Returns:
- the first item in the results collector
-
executeWithNoResult
Description copied from interface:GemfireFunctionOperationsExecute a GemFire Function registered with the given ID having no return value.- Specified by:
executeWithNoResultin interfaceGemfireFunctionOperations- Parameters:
functionId- the ID under which the GemFire function is registered.args- an array of Object arguments to the Function call.
-
execute
Description copied from interface:GemfireFunctionOperationsExecute a GemFire Function using a native GemFireExecutioninstance.- Specified by:
executein interfaceGemfireFunctionOperations- Type Parameters:
T- type parameter specifying the result type of the Function execution.- Parameters:
callback- a callback providing the execution instance.- Returns:
- the Function execution result.
- See Also:
-
execute
protected <T> Iterable<T> execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution) -
execute
protected <T> Iterable<T> execute(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution, boolean returnResult) -
executeAndExtract
protected <T> T executeAndExtract(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution) -
setResultCollector
-
getResultCollector
-
setTimeout
public void setTimeout(long timeout) -
getTimeout
public long getTimeout()
-