Class GemfireOnRegionFunctionTemplate
java.lang.Object
org.springframework.data.gemfire.function.execution.GemfireOnRegionFunctionTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,GemfireFunctionOperations
,GemfireOnRegionOperations
An
AbstractFunctionTemplate
implementation for executing
a Function
on a target Region
.- See Also:
-
Region
Execution
Function
AbstractFunctionTemplate
GemfireOnRegionOperations
-
Constructor Summary
ConstructorDescriptionGemfireOnRegionFunctionTemplate
(org.apache.geode.cache.Region<?, ?> region) Constructs a new instance of theGemfireOnRegionFunctionTemplate
initialized 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> T
execute
(GemfireFunctionCallback<T> callback) Execute a GemFire Function using a native GemFireExecution
instance.<T> T
executeAndExtract
(String functionId, Object... args) Execute a GemFire Function registered with an ID and with an expected singleton result<T> T
executeAndExtract
(String functionId, Set<?> keys, Object... args) <T> T
executeAndExtract
(org.apache.geode.cache.execute.Function function, Object... args) Execute an unregistered GemFire Function with the expected singleton result.protected <T> T
executeAndExtract
(org.springframework.data.gemfire.function.execution.AbstractFunctionExecution functionExecution) void
executeWithNoResult
(String functionId, Object... args) Execute a GemFire Function registered with the given ID having no return value.void
executeWithNoResult
(String functionId, Set<?> keys, Object... args) protected org.springframework.data.gemfire.function.execution.OnRegionFunctionExecution
protected org.apache.geode.cache.Region<?,
?> org.apache.geode.cache.execute.ResultCollector<?,
?> long
void
setResultCollector
(org.apache.geode.cache.execute.ResultCollector<?, ?> resultCollector) void
setTimeout
(long timeout) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.gemfire.function.execution.GemfireFunctionOperations
execute, execute, execute, executeAndExtract, executeAndExtract, executeWithNoResult
Methods inherited from interface org.springframework.data.gemfire.function.execution.GemfireOnRegionOperations
execute, executeAndExtract, executeWithNoResult
-
Constructor Details
-
GemfireOnRegionFunctionTemplate
public GemfireOnRegionFunctionTemplate(org.apache.geode.cache.Region<?, ?> region) Constructs a new instance of theGemfireOnRegionFunctionTemplate
initialized with the givenRegion
.- Parameters:
region
-Region
on which theFunction
will be executed.- Throws:
IllegalArgumentException
- ifRegion
is null.- See Also:
-
Region
-
-
Method Details
-
getFunctionExecution
protected org.springframework.data.gemfire.function.execution.OnRegionFunctionExecution getFunctionExecution() -
getRegion
protected org.apache.geode.cache.Region<?,?> getRegion() -
execute
- Specified by:
execute
in interfaceGemfireOnRegionOperations
-
executeAndExtract
- Specified by:
executeAndExtract
in interfaceGemfireOnRegionOperations
-
executeWithNoResult
- Specified by:
executeWithNoResult
in interfaceGemfireOnRegionOperations
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
execute
Description copied from interface:GemfireFunctionOperations
Execute an unregistered GemFire Function with the given arguments.- Specified by:
execute
in 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:GemfireFunctionOperations
Execute an unregistered GemFire Function with the expected singleton result.- Specified by:
executeAndExtract
in 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:
-
Function
-
execute
Description copied from interface:GemfireFunctionOperations
Execute a GemFire Function registered with the given ID.- Specified by:
execute
in 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:GemfireFunctionOperations
Execute a GemFire Function registered with an ID and with an expected singleton result- Specified by:
executeAndExtract
in 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:GemfireFunctionOperations
Execute a GemFire Function registered with the given ID having no return value.- Specified by:
executeWithNoResult
in 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:GemfireFunctionOperations
Execute a GemFire Function using a native GemFireExecution
instance.- Specified by:
execute
in 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
public void setResultCollector(org.apache.geode.cache.execute.ResultCollector<?, ?> resultCollector) -
getResultCollector
public org.apache.geode.cache.execute.ResultCollector<?,?> getResultCollector() -
setTimeout
public void setTimeout(long timeout) -
getTimeout
public long getTimeout()
-