com.hazelcast.instance

## 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 Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Address` | `getBindAddress()` Deprecated. use `getBindAddress(EndpointQualifier.MEMBER` instead
    `Address` | `getBindAddress(EndpointQualifier qualifier)` Returns a server socket listener address.
    `Address` | `getPublicAddress()` Deprecated. use `getPublicAddress(EndpointQualifier.MEMBER` instead
    `Address` | `getPublicAddress(EndpointQualifier qualifier)` Returns a public address to be advertised to other cluster members and clients.
    `Map<EndpointQualifier,Address>` | `getPublicAddressMap()`
    `ServerSocketChannel` | `getServerSocketChannel()` Deprecated. use `getServerSocketChannel(EndpointQualifier.MEMBER` instead
    `ServerSocketChannel` | `getServerSocketChannel(EndpointQualifier qualifier)` Returns a server channel.
    `Map<EndpointQualifier,ServerSocketChannel>` | `getServerSocketChannels()` Returns all `ServerSocketChannel`s of this member, mapped by corresponding `EndpointQualifier`
    `void` | `pickAddress()` Picks both server socket listener address and public address.

- - ### Method Detail

    - #### pickAddress

          void pickAddress()
                    throws Exception

      Picks both server socket listener address and public address.
      Throws:
        `Exception`

    - #### getBindAddress

          @Deprecated
          Address getBindAddress()

      Deprecated. use `getBindAddress(EndpointQualifier.MEMBER` instead
      Returns:
        the bind address for this node's member server socket

    - #### getBindAddress

          Address getBindAddress(EndpointQualifier qualifier)

      Returns a server socket listener address. The returned address for different `EndpointQualifier`s 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

          @Deprecated
          Address getPublicAddress()

      Deprecated. use `getPublicAddress(EndpointQualifier.MEMBER` instead
      Returns:
        the public address for this node's member server socket

    - #### 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

          @Deprecated
          ServerSocketChannel getServerSocketChannel()

      Deprecated. use `getServerSocketChannel(EndpointQualifier.MEMBER` instead
      Returns:
        the server socket channel for this node's member server socket

    - #### 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 `ServerSocketChannel`s of this member, mapped by corresponding `EndpointQualifier`
      Returns:
        a `Map<EndpointQualifier, ServerSocketChannel>` of this member's server socket channels
      Since:
        3.12

Copyright © 2019. All rights reserved.