Package org.jgroups.protocols.relay
Class SiteMaster
java.lang.Object
org.jgroups.util.UUID
org.jgroups.util.FlagsUUID
org.jgroups.util.ExtendedUUID
org.jgroups.protocols.relay.SiteUUID
org.jgroups.protocols.relay.SiteMaster
- All Implemented Interfaces:
Comparable<Address>,Address,Constructable<UUID>,SiteAddress,SizeStreamable,Streamable
Special address with the UUID part being 0: identifies the current (relay) coordinator of a given site. E,g, if we
send a message with dest=SiteMaster(SFO) from site LON, then the message will be forwarded to the relay coordinator
of the SFO site
- Since:
- 3.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgroups.protocols.relay.SiteAddress
SiteAddress.Type -
Field Summary
FieldsFields inherited from class org.jgroups.util.ExtendedUUID
keys, print_function, valuesFields inherited from class org.jgroups.util.UUID
leastSigBits, mostSigBits, SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares this UUID with the specified UUID.copy()create()Creates an instance of the class implementing this interfacebooleanCompares this object to the specified object.inthashCode()Returns a hash code for thisUUID.booleanWhether or not this address causes a message to be sent to mulitple members.booleanWhether or not this address is aSiteMaster.toString()type()Temporary kludge to avoid instanceofMethods inherited from class org.jgroups.protocols.relay.SiteUUID
getName, getSite, isSiteAddress, print, printOthers, readFrom, serializedSize, writeToMethods inherited from class org.jgroups.util.ExtendedUUID
addContents, get, get, keyExists, keyExists, length, print, put, put, put, randomUUID, randomUUID, read, remove, remove, resize, setPrintFunction, sizeofHashMap, writeMethods inherited from class org.jgroups.util.UUID
compareTo, digits, fromString, generateRandomBytes, getLeastSignificantBits, getMostSignificantBits, printName, toStringLong
-
Field Details
-
ALL_SMS
-
HASH
protected static final int HASH
-
-
Constructor Details
-
SiteMaster
public SiteMaster() -
SiteMaster
-
-
Method Details
-
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface- Specified by:
createin interfaceConstructable<UUID>- Overrides:
createin classSiteUUID
-
type
Description copied from interface:SiteAddressTemporary kludge to avoid instanceof -
isMulticast
public boolean isMulticast()Description copied from interface:AddressWhether 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
-
isSiteMaster
public boolean isSiteMaster()Description copied from interface:AddressWhether 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
-
compareTo
Description copied from class:UUIDCompares this UUID with the specified UUID.The first of two UUIDs is greater than the second if the most significant field in which the UUIDs differ is greater for the first UUID.
- Specified by:
compareToin interfaceComparable<Address>- Overrides:
compareToin classSiteUUID- Parameters:
other-UUIDto which thisUUIDis to be compared- Returns:
- -1, 0 or 1 as this
UUIDis less than, equal to, or greater thanval
-
equals
Description copied from class:UUIDCompares this object to the specified object. The result istrueif and only if the argument is notnull, is aUUIDobject, and contains the same most- and least significant bits. -
hashCode
public int hashCode()Description copied from class:UUIDReturns a hash code for thisUUID. -
copy
-
toString
-