Pivotal Knowledge Base

Follow

Function execution and pr-single-hop-enabled

Applies to

GemFire 6 - 8.1

Purpose

The purpose of this article is to describe how enabling pr-single-hop-enabled also affects how function execution is carried out.

Description

When pr-single-hop-enabled is false the following steps happens when a function is executed:

  1. When you call the execute method on the Function Execution object, the execution is sent to all members where it needs to run. The locations are determined by the FunctionService on* method calls, region configuration, and any filters. With onRegion, for a client region, the function is sent to the server system. For a non-client region, the function is handled in the calling application’s distributed system.
  2. If the function has results, the result is returned to the execute method call in a ResultCollector object.
  3. The originating member collects results using ResultCollector.getResult.
  4. If the execute method throws a FunctionException, the exception is handled in a specialised manner. GemFire transmits the exception to the calling side, and the FunctionException is then thrown in the caller’s execution stack as if it had originated on the calling side.

If enabling single-hop the client will act as the coordinating member and results will be sent directly from the members executing the function to the client.

Comments

Powered by Zendesk