org.springframework.data.gemfire.function
Class PojoFunctionWrapper
java.lang.Object
org.springframework.data.gemfire.function.PojoFunctionWrapper
- All Implemented Interfaces:
- com.gemstone.gemfire.cache.execute.Function, com.gemstone.gemfire.lang.Identifiable, Serializable
public class PojoFunctionWrapper
- extends Object
- implements com.gemstone.gemfire.cache.execute.Function
Invokes a POJO's given method as a Gemfire remote function.
If the POJO has a constructor that takes a Map, and the function context is Region, the
region will be injected. The delegate class name, the method name, and the method arguments
are part of a remote function invocation, therefore all arguments must be serializable
or an alternate serialization method must be used.
The delegate class must be the class path of the remote cache(s)
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PojoFunctionWrapper
public PojoFunctionWrapper(Object target,
Method method,
String id)
getId
public String getId()
- Specified by:
getId
in interface com.gemstone.gemfire.cache.execute.Function
- Specified by:
getId
in interface com.gemstone.gemfire.lang.Identifiable
hasResult
public boolean hasResult()
- Specified by:
hasResult
in interface com.gemstone.gemfire.cache.execute.Function
isHA
public boolean isHA()
- Specified by:
isHA
in interface com.gemstone.gemfire.cache.execute.Function
setHA
public void setHA(boolean HA)
optimizeForWrite
public boolean optimizeForWrite()
- Specified by:
optimizeForWrite
in interface com.gemstone.gemfire.cache.execute.Function
setOptimizeForWrite
public void setOptimizeForWrite(boolean optimizeForWrite)
setBatchSize
public void setBatchSize(int batchSize)
setHasResult
public void setHasResult(boolean hasResult)
execute
public void execute(com.gemstone.gemfire.cache.execute.FunctionContext functionContext)
- Specified by:
execute
in interface com.gemstone.gemfire.cache.execute.Function
invokeTargetMethod
protected final Object invokeTargetMethod(Object[] args)