Package org.jgroups

Interface Address

All Superinterfaces:
Comparable<Address>, SizeStreamable, Streamable
All Known Subinterfaces:
PhysicalAddress, SiteAddress
All Known Implementing Classes:
ExtendedUUID, FlagsUUID, IpAddress, MillisAddress, NullAddress, SiteMaster, SiteUUID, UUID

public interface Address extends SizeStreamable, Comparable<Address>
Address identifies cluster member. For example, whenever a unicast message is sent in a cluster an Address of a cluster member message recipient needs to be specified. Similarly a cluster member can use Address to check its own identity, request a state from a particular member and so on. Addresses are mostly generated by the bottom-most (transport) layers (e.g. UDP, TCP, LOOPBACK).
Since:
2.0
See Also:
  • Field Details

  • Method Details

    • isMulticast

      default boolean isMulticast()
      Whether or not this address causes a message to be sent to mulitple members. Typically, 'null' as destination sends the message to all members of a cluster, and a non-null address sends it to a single member. However, if a non-null destination address causes multicast behavior, this method needs to return true.
      Returns:
      True if a message with this address as destination is sent to multiple members, else false
    • isSiteAddress

      default boolean isSiteAddress()
      Whether or not this address is a SiteAddress. Kludgey workaround to avoid the use of instanceof SiteAddress.

      Will be removed once the type pollution issue (https://bugs.openjdk.org/browse/JDK-8180450) is fixed.

      Returns:
      True if this address is a site address, otherwise false
    • isSiteMaster

      default boolean isSiteMaster()
      Whether or not this address is a SiteMaster. Kludgey workaround to avoid the use of instanceof SiteMaster.

      Will be removed once the type pollution issue (https://bugs.openjdk.org/browse/JDK-8180450) is fixed.

      Returns:
      true if this address is a site master, false otherwise