Interface FunctionContext<T1>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      T1 getArguments()
      Returns the arguments provided to this function execution.
      Cache getCache()  
      java.lang.String getFunctionId()
      Returns the identifier of the function.
      default java.lang.String getMemberName()
      a convenience method to get the name of the member this function executes on.
      java.lang.Object getPrincipal()
      If available, returns the principal that has been authenticated to execute this function.
      <T2> ResultSender<T2> getResultSender()
      Returns the ResultSender which is used to add the ability for an execute method to send a single result back, or break its result into multiple pieces and send each piece back to the calling thread's ResultCollector.
      boolean isPossibleDuplicate()
      Returns a boolean to identify whether this is a re-execute.
    • Method Detail

      • getArguments

        T1 getArguments()
        Returns the arguments provided to this function execution. These are the arguments specified by the caller using Execution.setArguments(Object)
        Returns:
        the arguments or null if there are no arguments
        Since:
        GemFire 6.0
      • getFunctionId

        java.lang.String getFunctionId()
        Returns the identifier of the function.
        Returns:
        a unique identifier
        Since:
        GemFire 6.0
        See Also:
        Function.getId()
      • getResultSender

        <T2> ResultSender<T2> getResultSender()
        Returns the ResultSender which is used to add the ability for an execute method to send a single result back, or break its result into multiple pieces and send each piece back to the calling thread's ResultCollector. The returned ResultSender is only valid for the duration of the function call. If the Function needs to return a result, the result should be sent before the function exits.
        Type Parameters:
        T2 - the type handled by the returned ResultSender
        Returns:
        the ResultSender associated with this FunctionContext
        Since:
        GemFire 6.0
      • isPossibleDuplicate

        boolean isPossibleDuplicate()
        Returns a boolean to identify whether this is a re-execute. Returns true if it is a re-execute else returns false
        Returns:
        a boolean (true) to identify whether it is a re-execute (else false)
        Since:
        GemFire 6.5
        See Also:
        Function.isHA()
      • getCache

        Cache getCache()
      • getMemberName

        default java.lang.String getMemberName()
        a convenience method to get the name of the member this function executes on. call this function once in your function execution to avoid performance issues.
        Returns:
        member name or id if name is blank
      • getPrincipal

        java.lang.Object getPrincipal()
        If available, returns the principal that has been authenticated to execute this function. This will always be null if the LegacySecurityService is in use.
        Returns:
        the principal that has been authenticated