Interface RegistryClient

    • Method Detail

      • findServiceInstanceBy

        default Optional<ServiceInstance> findServiceInstanceBy​(String serviceName)
        Attempts to find a service instance with the given service name.

        If there are more than one instance, the implementation should decide the order in which the service is returned (e.g. round-robin, random, LIFO, FIFO, etc.)

        Parameters:
        serviceName - The name of the service that is being requested
        Returns:
        an Optional containing the found service or Optional.empty()
      • findServiceInstanceBy

        Optional<ServiceInstance> findServiceInstanceBy​(String serviceName,
                                                        String instanceId)
        Attempts to find a service instance with the given service name and the given instance id.
        Parameters:
        serviceName - The name of the service that is being requested
        instanceId - The id of the instance that is wanted
        Returns:
        an Optional containing the found service or Optional.empty()
      • findAllServiceInstancesBy

        default List<ServiceInstance> findAllServiceInstancesBy​(String serviceName)
        Attempts to find all service instances with the given service name.
        Parameters:
        serviceName - The name of the service that is being requested
        Returns:
        a List containing the found services
      • retrieveAllRegisteredInstances

        List<ServiceInstance> retrieveAllRegisteredInstances()
        Retrieves all registered service instances from the registry.
        Returns:
        a List containing all registered service instances