|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.util.UUID
public class UUID
Logical address which is unique over space and time.
Copied from java.util.UUID, but unneeded fields from the latter have been removed. UUIDs needs to
have a small memory footprint.
| Field Summary |
|---|
| Fields inherited from interface org.jgroups.Address |
|---|
IP_ADDR, NULL, UUID_ADDR |
| Constructor Summary | |
|---|---|
UUID()
|
|
UUID(long mostSigBits,
long leastSigBits)
|
|
| Method Summary | |
|---|---|
static void |
add(UUID uuid,
java.lang.String logical_name)
|
java.lang.Object |
clone()
|
int |
compareTo(Address other)
Compares this UUID with the specified UUID. |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object. |
static java.lang.String |
get(Address logical_addr)
|
byte[] |
getAdditionalData()
Deprecated. Will be removed in 3.0. This was only added to be backwards compatible with 2.7 |
long |
getLeastSignificantBits()
|
long |
getMostSignificantBits()
Returns the most significant 64 bits of this UUID's 128 bit value. |
int |
hashCode()
Returns a hash code for this UUID. |
boolean |
isMulticastAddress()
Checks whether this is an address that represents multiple destinations; e.g., a class D address in the Internet. |
static java.lang.String |
printCache()
|
static UUID |
randomUUID()
Static factory to retrieve a type 4 (pseudo randomly generated) UUID. |
void |
readExternal(java.io.ObjectInput in)
|
void |
readFrom(java.io.DataInputStream in)
Read the state of the current object (including superclasses) from instream Note that the input stream must not be closed |
static void |
remove(UUID uuid)
|
static void |
removeAll(java.util.Collection<Address> mbrs)
|
static void |
retainAll(java.util.Collection<Address> logical_addrs)
|
void |
setAdditionalData(byte[] additional_data)
Deprecated. Will be removed in 3.0. This was only added to be backwards compatible with 2.7 |
int |
size()
Returns serialized size of this address |
java.lang.String |
toString()
|
java.lang.String |
toStringLong()
Returns a String object representing this UUID. |
void |
writeExternal(java.io.ObjectOutput out)
|
void |
writeTo(java.io.DataOutputStream out)
Write the entire state of the current object (including superclasses) to outstream. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UUID()
public UUID(long mostSigBits,
long leastSigBits)
| Method Detail |
|---|
public static void add(UUID uuid,
java.lang.String logical_name)
public static java.lang.String get(Address logical_addr)
public static void remove(UUID uuid)
public static void removeAll(java.util.Collection<Address> mbrs)
public static void retainAll(java.util.Collection<Address> logical_addrs)
public static java.lang.String printCache()
public final byte[] getAdditionalData()
public final void setAdditionalData(byte[] additional_data)
additional_data - The additional_data to setpublic static UUID randomUUID()
UUID is generated using a cryptographically strong pseudo
random number generator.
UUIDpublic long getLeastSignificantBits()
public long getMostSignificantBits()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringLong()
String object representing this UUID.
The UUID string representation is as described by this BNF:
UUID = <time_low> "-" <time_mid> "-" <time_high_and_version> "-" <variant_and_sequence> "-" <node> time_low = 4*<hexOctet> time_mid = 2*<hexOctet> time_high_and_version = 2*<hexOctet> variant_and_sequence = 2*<hexOctet> node = 6*<hexOctet> hexOctet = <hexDigit><hexDigit> hexDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "c" | "d" | "e" | "f" | "A" | "B" | "C" | "D" | "E" | "F"
UUIDpublic int hashCode()
UUID.
hashCode in class java.lang.ObjectUUIDpublic boolean equals(java.lang.Object obj)
true if and only if the argument is not null, is a UUID
object, has the same variant, and contains the same value, bit for bit,
as this UUID.
equals in class java.lang.Objectobj - The object to be compared
true if the objects are the same; false otherwisepublic int compareTo(Address other)
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.
compareTo in interface java.lang.Comparable<Address>other - UUID to which this UUID is to be compared
UUID is less than, equal to, or greater than val
public void writeTo(java.io.DataOutputStream out)
throws java.io.IOException
Streamable
writeTo in interface Streamablejava.io.IOException
public void readFrom(java.io.DataInputStream in)
throws java.io.IOException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
Streamable
readFrom in interface Streamablejava.io.IOException
java.lang.IllegalAccessException
java.lang.InstantiationExceptionpublic boolean isMulticastAddress()
Address
isMulticastAddress in interface Addresspublic int size()
Address
size in interface Address
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||