Spring Data for VMware GemFire
Class PojoFunctionWrapper
java.lang.Object
org.springframework.data.gemfire.function.PojoFunctionWrapper
- All Implemented Interfaces:
Serializable,org.apache.geode.cache.execute.Function,org.apache.geode.lang.Identifiable
Invokes a given
POJO Method as a (remote) GemFire/Geode Function.
If the POJO has a constructor that takes a Map, and the Function context
is a Region, the Region will be injected.
The delegate class name, the method name,
and Method arguments are part of the Function invocation, therefore all arguments
must be Serializable or an alternate serialization strategy must be used.
The delegate Class must be on the class path of the remote cache(s).- Since:
- 1.2.0
- See Also:
-
Function- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionPojoFunctionWrapper(Object target, Method method) PojoFunctionWrapper(Object target, Method method, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(org.apache.geode.cache.execute.FunctionContext functionContext) intgetId()Collection<org.apache.geode.security.ResourcePermission>getRequiredPermissions(String regionName) booleanprotected final ObjectinvokeTargetMethod(Object[] args) booleanisHA()protected org.springframework.data.gemfire.function.FunctionArgumentResolvernewFunctionArgumentResolver(Method method) booleanprotected booleanresolveHasResult(Method method) protected StringvoidsetBatchSize(int batchSize) voidsetHA(boolean HA) voidsetHasResult(boolean hasResult) voidsetOptimizeForWrite(boolean optimizeForWrite) voidsetRequiredPermissions(Collection<org.apache.geode.security.ResourcePermission> requiredPermissions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.geode.cache.execute.Function
getRequiredPermissions
-
Constructor Details
-
PojoFunctionWrapper
-
PojoFunctionWrapper
-
-
Method Details
-
newFunctionArgumentResolver
protected org.springframework.data.gemfire.function.FunctionArgumentResolver newFunctionArgumentResolver(Method method) -
resolveHasResult
-
resolveId
-
setBatchSize
public void setBatchSize(int batchSize) -
getBatchSize
public int getBatchSize() -
setHA
public void setHA(boolean HA) -
isHA
public boolean isHA()- Specified by:
isHAin interfaceorg.apache.geode.cache.execute.Function
-
setHasResult
public void setHasResult(boolean hasResult) -
hasResult
public boolean hasResult()- Specified by:
hasResultin interfaceorg.apache.geode.cache.execute.Function
-
getId
- Specified by:
getIdin interfaceorg.apache.geode.cache.execute.Function- Specified by:
getIdin interfaceorg.apache.geode.lang.Identifiable
-
setOptimizeForWrite
public void setOptimizeForWrite(boolean optimizeForWrite) -
optimizeForWrite
public boolean optimizeForWrite()- Specified by:
optimizeForWritein interfaceorg.apache.geode.cache.execute.Function
-
setRequiredPermissions
public void setRequiredPermissions(Collection<org.apache.geode.security.ResourcePermission> requiredPermissions) -
getRequiredPermissions
public Collection<org.apache.geode.security.ResourcePermission> getRequiredPermissions(String regionName) - Specified by:
getRequiredPermissionsin interfaceorg.apache.geode.cache.execute.Function
-
execute
public void execute(org.apache.geode.cache.execute.FunctionContext functionContext) - Specified by:
executein interfaceorg.apache.geode.cache.execute.Function
-
invokeTargetMethod
-