Interface AddressPicker


public interface AddressPicker
Strategy to select an Address that a Hazelcast cluster member binds its server socket to and a (potentially different) address that Hazelcast will advertise to other cluster members and clients.
  • Method Details

    • pickAddress

      void pickAddress() throws Exception
      Picks both server socket listener address and public address.
      Throws:
      Exception - if failure happened while picking an address.
    • getBindAddress

      Address getBindAddress​(EndpointQualifier qualifier)
      Returns a server socket listener address. The returned address for different EndpointQualifiers may be the same or different, depending on the actual network configuration.
      Returns:
      Address where the server socket was bound to or null if called before. pickAddress()
      Since:
      3.12
    • getPublicAddress

      Address getPublicAddress​(EndpointQualifier qualifier)
      Returns a public address to be advertised to other cluster members and clients.
      Returns:
      Address another members can use to connect to this member or null if called before pickAddress()
      Since:
      3.12
    • getPublicAddressMap

      Map<EndpointQualifier,​Address> getPublicAddressMap()
    • getServerSocketChannel

      ServerSocketChannel getServerSocketChannel​(EndpointQualifier qualifier)
      Returns a server channel.
      Returns:
      ServerSocketChannel to be listened to by an acceptor or null if called before pickAddress()
      Since:
      3.12
    • getServerSocketChannels

      Map<EndpointQualifier,​ServerSocketChannel> getServerSocketChannels()
      Returns all ServerSocketChannels of this member, mapped by corresponding EndpointQualifier
      Returns:
      a Map<EndpointQualifier, ServerSocketChannel> of this member's server socket channels
      Since:
      3.12