Package org.jgroups
Interface Address
-
- All Superinterfaces:
java.lang.Comparable<Address>
,SizeStreamable
,Streamable
- All Known Subinterfaces:
PhysicalAddress
,SiteAddress
- All Known Implementing Classes:
ExtendedUUID
,FlagsUUID
,IpAddress
,NullAddress
,SiteMaster
,SiteUUID
,UUID
public interface Address extends SizeStreamable, java.lang.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
- Author:
- Bela Ban
- See Also:
PhysicalAddress
,UUID
-
-
Field Summary
Fields Modifier and Type Field Description static byte
IP_ADDR
static byte
NULL
static byte
SITE_MASTER
static byte
SITE_UUID
static byte
UUID_ADDR
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
isMulticast()
Whether or not this address causes a message to be sent to mulitple members.default boolean
isSiteAddress()
Whether or not this address is aSiteAddress
.default boolean
isSiteMaster()
Whether or not this address is aSiteMaster
.-
Methods inherited from interface org.jgroups.util.SizeStreamable
serializedSize
-
Methods inherited from interface org.jgroups.util.Streamable
readFrom, writeTo
-
-
-
-
Field Detail
-
NULL
static final byte NULL
- See Also:
- Constant Field Values
-
UUID_ADDR
static final byte UUID_ADDR
- See Also:
- Constant Field Values
-
SITE_UUID
static final byte SITE_UUID
- See Also:
- Constant Field Values
-
SITE_MASTER
static final byte SITE_MASTER
- See Also:
- Constant Field Values
-
IP_ADDR
static final byte IP_ADDR
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-