public class PojoFunctionWrapper extends Object implements org.apache.geode.cache.execute.Function
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).Function,
Serialized Form| Constructor and Description |
|---|
PojoFunctionWrapper(Object target,
Method method) |
PojoFunctionWrapper(Object target,
Method method,
String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(org.apache.geode.cache.execute.FunctionContext functionContext) |
int |
getBatchSize() |
String |
getId() |
Collection<org.apache.geode.security.ResourcePermission> |
getRequiredPermissions(String regionName) |
boolean |
hasResult() |
protected Object |
invokeTargetMethod(Object[] args) |
boolean |
isHA() |
protected org.springframework.data.gemfire.function.FunctionArgumentResolver |
newFunctionArgumentResolver(Method method) |
boolean |
optimizeForWrite() |
protected boolean |
resolveHasResult(Method method) |
protected String |
resolveId(Method method,
String id) |
void |
setBatchSize(int batchSize) |
void |
setHA(boolean HA) |
void |
setHasResult(boolean hasResult) |
void |
setOptimizeForWrite(boolean optimizeForWrite) |
void |
setRequiredPermissions(Collection<org.apache.geode.security.ResourcePermission> requiredPermissions) |
protected org.springframework.data.gemfire.function.FunctionArgumentResolver newFunctionArgumentResolver(Method method)
protected boolean resolveHasResult(Method method)
public void setBatchSize(int batchSize)
public int getBatchSize()
public void setHA(boolean HA)
public boolean isHA()
isHA in interface org.apache.geode.cache.execute.Functionpublic void setHasResult(boolean hasResult)
public boolean hasResult()
hasResult in interface org.apache.geode.cache.execute.Functionpublic String getId()
getId in interface org.apache.geode.cache.execute.FunctiongetId in interface org.apache.geode.lang.Identifiablepublic void setOptimizeForWrite(boolean optimizeForWrite)
public boolean optimizeForWrite()
optimizeForWrite in interface org.apache.geode.cache.execute.Functionpublic void setRequiredPermissions(Collection<org.apache.geode.security.ResourcePermission> requiredPermissions)
public Collection<org.apache.geode.security.ResourcePermission> getRequiredPermissions(String regionName)
getRequiredPermissions in interface org.apache.geode.cache.execute.Functionpublic void execute(org.apache.geode.cache.execute.FunctionContext functionContext)
execute in interface org.apache.geode.cache.execute.FunctionCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.