Class PojoFunctionWrapper
java.lang.Object
org.springframework.data.gemfire.function.PojoFunctionWrapper
- All Implemented Interfaces:
Serializable
,Function
,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
- Author:
- David Turanski, John Blum
- See Also:
-
Constructor Summary
ConstructorDescriptionPojoFunctionWrapper
(Object target, Method method) PojoFunctionWrapper
(Object target, Method method, String id) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(FunctionContext functionContext) int
getId()
getRequiredPermissions
(String regionName) boolean
protected final Object
invokeTargetMethod
(Object[] args) boolean
isHA()
protected org.springframework.data.gemfire.function.FunctionArgumentResolver
newFunctionArgumentResolver
(Method method) boolean
protected boolean
resolveHasResult
(Method method) protected String
void
setBatchSize
(int batchSize) void
setHA
(boolean HA) void
setHasResult
(boolean hasResult) void
setOptimizeForWrite
(boolean optimizeForWrite) void
setRequiredPermissions
(Collection<ResourcePermission> requiredPermissions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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() -
setHasResult
public void setHasResult(boolean hasResult) -
hasResult
public boolean hasResult() -
getId
- Specified by:
getId
in interfaceFunction
- Specified by:
getId
in interfaceIdentifiable
-
setOptimizeForWrite
public void setOptimizeForWrite(boolean optimizeForWrite) -
optimizeForWrite
public boolean optimizeForWrite()- Specified by:
optimizeForWrite
in interfaceFunction
-
setRequiredPermissions
-
getRequiredPermissions
- Specified by:
getRequiredPermissions
in interfaceFunction
-
execute
-
invokeTargetMethod
-