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:
java.lang.Comparable<Address>,Address,Constructable<UUID>,SiteAddress,SizeStreamable,Streamable
- Direct Known Subclasses:
SiteMaster
public class SiteUUID extends ExtendedUUID implements SiteAddress
Implementation of SiteAddress- Since:
- 3.2
- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected static byte[]NAMEprotected static byte[]SITE_NAME-
Fields inherited from class org.jgroups.util.ExtendedUUID
keys, print_function, values
-
Fields inherited from class org.jgroups.util.UUID
leastSigBits, mostSigBits, SIZE
-
Fields inherited from interface org.jgroups.Address
IP_ADDR, IP_ADDR_UUID, NULL, SITE_MASTER, SITE_UUID, UUID_ADDR
-
-
Constructor Summary
Constructors Constructor Description SiteUUID()SiteUUID(long mostSigBits, long leastSigBits, byte[] name, byte[] site)SiteUUID(long mostSigBits, long leastSigBits, java.lang.String name, java.lang.String site)SiteUUID(UUID uuid, java.lang.String name, java.lang.String site)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Address other)Compares this UUID with the specified UUID.UUIDcopy()java.util.function.Supplier<? extends UUID>create()Creates an instance of the class implementing this interfacebooleanequals(java.lang.Object obj)Compares this object to the specified object.java.lang.StringgetName()java.lang.StringgetSite()Returns the ID of the site (all sites need to have a unique site ID)inthashCode()Returns a hash code for thisUUID.java.lang.Stringprint(boolean detailed)protected java.lang.StringprintOthers()java.lang.StringtoString()-
Methods inherited from class org.jgroups.util.ExtendedUUID
addContents, get, get, keyExists, keyExists, length, print, put, put, put, randomUUID, randomUUID, read, readFrom, remove, remove, resize, serializedSize, setPrintFunction, sizeofHashMap, write, writeTo
-
Methods inherited from class org.jgroups.util.UUID
digits, fromString, generateRandomBytes, getLeastSignificantBits, getMostSignificantBits, toStringLong
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jgroups.util.SizeStreamable
serializedSize
-
Methods inherited from interface org.jgroups.util.Streamable
readFrom, writeTo
-
-
-
-
Constructor Detail
-
SiteUUID
public SiteUUID()
-
SiteUUID
public SiteUUID(long mostSigBits, long leastSigBits, java.lang.String name, java.lang.String site)
-
SiteUUID
public SiteUUID(long mostSigBits, long leastSigBits, byte[] name, byte[] site)
-
SiteUUID
public SiteUUID(UUID uuid, java.lang.String name, java.lang.String site)
-
-
Method Detail
-
create
public java.util.function.Supplier<? extends UUID> create()
Description copied from interface:ConstructableCreates an instance of the class implementing this interface- Specified by:
createin interfaceConstructable<UUID>- Overrides:
createin classExtendedUUID
-
getName
public java.lang.String getName()
-
getSite
public java.lang.String getSite()
Description copied from interface:SiteAddressReturns the ID of the site (all sites need to have a unique site ID)- Specified by:
getSitein interfaceSiteAddress
-
toString
public java.lang.String toString()
- Overrides:
toStringin classExtendedUUID
-
hashCode
public int hashCode()
Description copied from class:UUIDReturns a hash code for thisUUID.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:UUIDCompares this object to the specified object. The result istrueif and only if the argument is notnull, is aUUIDobject, has the same variant, and contains the same value, bit for bit, as thisUUID.
-
compareTo
public int compareTo(Address other)
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.
-
print
public java.lang.String print(boolean detailed)
-
printOthers
protected java.lang.String printOthers()
-
-