Package org.jgroups.protocols.relay
Class SiteUUID
java.lang.Object
org.jgroups.util.UUID
org.jgroups.util.FlagsUUID
org.jgroups.util.ExtendedUUID
org.jgroups.protocols.relay.SiteUUID
- All Implemented Interfaces:
Comparable<Address>,Address,Constructable<UUID>,SiteAddress,SizeStreamable,Streamable
- Direct Known Subclasses:
SiteMaster
Implementation of SiteAddress
- 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.getName()getSite()Returns the ID of the site (all sites need to have a unique site ID)inthashCode()Returns a hash code for thisUUID.booleanWhether or not this address is aSiteAddress.print(boolean detailed) protected StringvoidRead the state of the current object (including superclasses) from instream Note that the input stream must not be closedintThe number of bytes required to serialize this instancetoString()voidwriteTo(DataOutput out) Write the entire state of the current object (including superclasses) to outstream.Methods 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, toStringLongMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jgroups.Address
isMulticast, isSiteMasterMethods inherited from interface org.jgroups.protocols.relay.SiteAddress
type
-
Field Details
-
site
-
name
-
-
Constructor Details
-
SiteUUID
public SiteUUID() -
SiteUUID
-
SiteUUID
@Deprecated(since="5.2.15") public SiteUUID(long mostSigBits, long leastSigBits, byte[] name, byte[] site) Deprecated. -
SiteUUID
-
-
Method Details
-
getName
-
getSite
Description copied from interface:SiteAddressReturns the ID of the site (all sites need to have a unique site ID)- Specified by:
getSitein interfaceSiteAddress
-
create
Description copied from interface:ConstructableCreates an instance of the class implementing this interface- Specified by:
createin interfaceConstructable<UUID>- Overrides:
createin classExtendedUUID
-
copy
-
toString
- Overrides:
toStringin classExtendedUUID
-
hashCode
public int hashCode()Description copied from class:UUIDReturns a hash code for thisUUID. -
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. -
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 classUUID- Parameters:
other-UUIDto which thisUUIDis to be compared- Returns:
- -1, 0 or 1 as this
UUIDis less than, equal to, or greater thanval
-
isSiteAddress
public boolean isSiteAddress()Description copied from interface:AddressWhether 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.
- Specified by:
isSiteAddressin interfaceAddress- Returns:
- True if this address is a site address, otherwise false
-
print
-
serializedSize
public int serializedSize()Description copied from class:ExtendedUUIDThe number of bytes required to serialize this instance- Specified by:
serializedSizein interfaceSizeStreamable- Overrides:
serializedSizein classExtendedUUID
-
writeTo
Description copied from interface:StreamableWrite the entire state of the current object (including superclasses) to outstream. Note that the output stream must not be closed- Specified by:
writeToin interfaceStreamable- Overrides:
writeToin classExtendedUUID- Throws:
IOException
-
readFrom
Description copied from interface:StreamableRead the state of the current object (including superclasses) from instream Note that the input stream must not be closed- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classExtendedUUID- Throws:
IOException
-
printOthers
-
SiteUUID(long, long, java.lang.String, java.lang.String)instead