Class PojoFunctionWrapper

java.lang.Object
org.springframework.data.gemfire.function.PojoFunctionWrapper
All Implemented Interfaces:
Serializable, Function, Identifiable

public class PojoFunctionWrapper extends Object implements Function
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 Details

    • PojoFunctionWrapper

      public PojoFunctionWrapper(Object target, Method method)
    • PojoFunctionWrapper

      public PojoFunctionWrapper(Object target, Method method, String id)
  • Method Details

    • newFunctionArgumentResolver

      protected org.springframework.data.gemfire.function.FunctionArgumentResolver newFunctionArgumentResolver(Method method)
    • resolveHasResult

      protected boolean resolveHasResult(Method method)
    • resolveId

      protected String resolveId(Method method, String id)
    • setBatchSize

      public void setBatchSize(int batchSize)
    • getBatchSize

      public int getBatchSize()
    • setHA

      public void setHA(boolean HA)
    • isHA

      public boolean isHA()
      Specified by:
      isHA in interface Function
    • setHasResult

      public void setHasResult(boolean hasResult)
    • hasResult

      public boolean hasResult()
      Specified by:
      hasResult in interface Function
    • getId

      public String getId()
      Specified by:
      getId in interface Function
      Specified by:
      getId in interface Identifiable
    • setOptimizeForWrite

      public void setOptimizeForWrite(boolean optimizeForWrite)
    • optimizeForWrite

      public boolean optimizeForWrite()
      Specified by:
      optimizeForWrite in interface Function
    • setRequiredPermissions

      public void setRequiredPermissions(Collection<ResourcePermission> requiredPermissions)
    • getRequiredPermissions

      public Collection<ResourcePermission> getRequiredPermissions(String regionName)
      Specified by:
      getRequiredPermissions in interface Function
    • execute

      public void execute(FunctionContext functionContext)
      Specified by:
      execute in interface Function
    • invokeTargetMethod

      protected final Object invokeTargetMethod(Object[] args)