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
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final bytestatic final bytestatic final bytestatic final byte -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether or not this address causes a message to be sent to mulitple members.default booleanWhether or not this address is aSiteAddress.default booleanWhether or not this address is aSiteMaster.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.jgroups.util.SizeStreamable
serializedSizeMethods inherited from interface org.jgroups.util.Streamable
readFrom, writeTo
-
Field Details
-
NULL
static final byte NULL- See Also:
-
UUID_ADDR
static final byte UUID_ADDR- See Also:
-
SITE_UUID
static final byte SITE_UUID- See Also:
-
SITE_MASTER
static final byte SITE_MASTER- See Also:
-
IP_ADDR
static final byte IP_ADDR- See Also:
-
-
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 aSiteAddress. Kludgey workaround to avoid the use ofinstanceof 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 aSiteMaster. Kludgey workaround to avoid the use ofinstanceof 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
-