### *** This interface provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.discovery

# Interface LookupPolicyInterface

All Known Implementing Classes:
  `LookupPolicyAttempts`, `LookupPolicyTimeout`

@SASScope("ALL") @BinaryCompatibilityOnly public interface LookupPolicyInterface
Interface describing service lookup policies that a local discovery service should observe:

- policy to retry to find services in the event that service(s) were not available at the time a request was submitted.

Since:
  1.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `isOKToRetryLookup(String serviceLookupRequestId)`
  In the event that a local service lookup fails to return any results, this method will be invoked to determine whether or not the service lookup should be re-attempted.
  `void`
  `serviceLookupInitiated(String serviceLookupRequestId)`
  Notifies the policy implementation that a service lookup has started.
  `void`
  `serviceLookupTerminated(String serviceLookupRequestId)`
  Notifies the policy implementation that a service lookup has been terminated.

- ## Method Details

  - ### serviceLookupInitiated

    void serviceLookupInitiated(String serviceLookupRequestId)
    Notifies the policy implementation that a service lookup has started.
    Parameters:
      `serviceLookupRequestId` - An ID that the policy control implementation can use to distinguish between multiple service lookup requests. This value will be used in future interactions between the local discovery service and this policy implementation. Refer to the following methods for additional details.
      - `(String) isOKToRetryLookup (serviceLookupRequestId)`
      - `(String) serviceLookupTerminated (serviceLookupRequestId)`

  - ### serviceLookupTerminated

    void serviceLookupTerminated(String serviceLookupRequestId)
    Notifies the policy implementation that a service lookup has been terminated.
    Parameters:
      `serviceLookupRequestId` - An ID that the policy control implementation can use to distinguish between multiple service lookup requests. This value was originally provided to the policy implementation when it was notified of the start of a service lookup via the `(String) serviceLookupInitiated (serviceLookupRequestId)` method.

  - ### isOKToRetryLookup

    boolean isOKToRetryLookup(String serviceLookupRequestId)
    In the event that a local service lookup fails to return any results, this method will be invoked to determine whether or not the service lookup should be re-attempted.
    Parameters:
      `serviceLookupRequestId` - The ID associated with a particular service lookup request. The policy control implementation can use to distinguish between multiple service lookup requests. This value was originally provided to the policy implementation when it was notified of the start of a service lookup via the `(String) serviceLookupInitiated (serviceLookupRequestId)` method.
    Returns:
      `true` if the service lookup should be re-attempted or `false` if it shouldn't.