Interface ICallDelegationStrategy

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ICallDelegationStrategy
Function object that specifies how hints (including backend preferences) shall propagate through pattern calls.

A few useful default implementations are included as static fields.

As of 2.1, only suppported by the local search backend, and only if the pattern call is not flattened.

Since:
2.1
  • Field Details

    • FULL_BACKEND_ADHESION

      static final ICallDelegationStrategy FULL_BACKEND_ADHESION
      Options known for callee are used to override caller options, except the backend selection. Always use the same backend for the callee and the caller, regardless what is specified for the callee pattern.
    • PARTIAL_BACKEND_ADHESION

      static final ICallDelegationStrategy PARTIAL_BACKEND_ADHESION
      Options known for callee are used to override caller options, including the backend selection. If callee does not specify a backend requirement, the backend of the caller is kept.
    • NO_BACKEND_ADHESION

      static final ICallDelegationStrategy NO_BACKEND_ADHESION
      Options known for callee are used to override caller options, including the backend selection. Always use the backend specified for the callee (or the default if none), regardless of the backend of the caller.
  • Method Details

    • transformHints

      QueryEvaluationHint transformHints(IQueryReference call, QueryEvaluationHint callerHint, IQueryBackend callerBackend, IQueryBackendHintProvider calleeHintProvider)
      Specifies how hints (including backend preferences) shall propagate through pattern calls.
      Parameters:
      call - a PConstraint in a query that calls another query.
      callerHint - a hint under which the calling pattern is evaluated,
      callerBackend - the actual backend evaluating the calling pattern.
      calleeHintProvider - the provider of hints for the called pattern.
      Returns:
      the hints, including backend selection, that the backend responsible for the caller pattern must specify when requesting the IQueryResultProvider for the called pattern via IQueryResultProviderAccess.