Spring Data for VMware GemFire
Class AbstractClientFunctionTemplate
java.lang.Object
org.springframework.data.gemfire.function.execution.AbstractClientFunctionTemplate
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,GemfireFunctionOperations
- Direct Known Subclasses:
GemfireOnServerFunctionTemplate,GemfireOnServersFunctionTemplate
Abstract base class for Apache Geode client-side
Function Execution.- Since:
- 2.3.0
- See Also:
-
RegionServiceClientCachePoolExecutionFunction
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractClientFunctionTemplate(String poolName) AbstractClientFunctionTemplate(org.apache.geode.cache.client.Pool pool) AbstractClientFunctionTemplate(org.apache.geode.cache.RegionService regionService) -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> Iterable<T>Execute a GemFire Function registered with the given ID.<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(org.apache.geode.cache.execute.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.protected org.springframework.data.gemfire.function.execution.AbstractFunctionExecutionprotected PoolResolverorg.apache.geode.cache.execute.ResultCollector<?,?> longprotected abstract org.springframework.data.gemfire.function.execution.AbstractFunctionExecutionnewFunctionExecutionUsingPool(org.apache.geode.cache.client.Pool pool) protected abstract org.springframework.data.gemfire.function.execution.AbstractFunctionExecutionnewFunctionExecutionUsingRegionService(org.apache.geode.cache.RegionService regionService) protected org.apache.geode.cache.client.ClientCacheDeprecated.protected org.apache.geode.cache.client.Poolprotected org.apache.geode.cache.client.Poolprotected org.apache.geode.cache.client.Poolprotected org.apache.geode.cache.RegionServiceprotected ObjectvoidsetPool(org.apache.geode.cache.client.Pool pool) voidsetPoolName(String poolName) voidsetPoolResolver(PoolResolver poolResolver) voidsetResultCollector(org.apache.geode.cache.execute.ResultCollector<?, ?> resultCollector) voidsetTimeout(long timeout)
-
Field Details
-
DEFAULT_POOL_RESOLVER
-
-
Constructor Details
-
AbstractClientFunctionTemplate
public AbstractClientFunctionTemplate(org.apache.geode.cache.RegionService regionService) -
AbstractClientFunctionTemplate
public AbstractClientFunctionTemplate(org.apache.geode.cache.client.Pool pool) -
AbstractClientFunctionTemplate
-
-
Method Details
-
setPool
public void setPool(org.apache.geode.cache.client.Pool pool) -
setPoolName
-
setPoolResolver
-
getPoolResolver
-
resolveRequiredGemFireObject
-
resolveClientCache
Deprecated.as of 2.3.0; UseresolveRegionService(). -
resolvePool
protected org.apache.geode.cache.client.Pool resolvePool() -
resolveDefaultPool
protected org.apache.geode.cache.client.Pool resolveDefaultPool() -
resolveNamedPool
protected org.apache.geode.cache.client.Pool resolveNamedPool() -
resolveRegionService
protected org.apache.geode.cache.RegionService resolveRegionService() -
getFunctionExecution
protected org.springframework.data.gemfire.function.execution.AbstractFunctionExecution getFunctionExecution() -
newFunctionExecutionUsingPool
protected abstract org.springframework.data.gemfire.function.execution.AbstractFunctionExecution newFunctionExecutionUsingPool(org.apache.geode.cache.client.Pool pool) -
newFunctionExecutionUsingRegionService
protected abstract org.springframework.data.gemfire.function.execution.AbstractFunctionExecution newFunctionExecutionUsingRegionService(org.apache.geode.cache.RegionService regionService) -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- 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:
-
Function
-
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
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()
-
resolveRegionService().