Interface ServerSelector


@Unstable public interface ServerSelector
Select the most appropriate server among the list of servers of an endpoint.
Author:
Julien Viet
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Selects a server.
    default int
    Select a server using a routing key.
  • Method Details

    • select

      int select()
      Selects a server.
      Returns:
      the selected index or -1 if selection could not be achieved
    • select

      default int select(String key)
      Select a server using a routing key.
      Parameters:
      key - a key used for routing in sticky strategies
      Returns:
      the selected index or -1 if selection could not be achieved