public class Uid
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected long[] |
hostAddr |
protected int |
other |
protected int |
process |
protected int |
sec |
static int |
UID_SIZE |
Constructor and Description |
---|
Uid()
Create a new instance.
|
Uid(byte[] byteForm) |
Uid(long[] addr,
int processId,
int time,
int incr) |
Uid(java.lang.String uidString)
Create Uid from string representation.
|
Uid(java.lang.String uidString,
boolean errsOk)
Create Uid from string representation.
|
Uid(Uid copyFrom)
Create a copy of the specified identifier.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Create a copy of this instance.
|
boolean |
equals(java.lang.Object o)
Override Object.equals
|
boolean |
equals(Uid u) |
java.lang.String |
fileStringForm() |
byte[] |
getBytes()
Get the byte representation of the Uid.
|
java.lang.String |
getHexPid() |
boolean |
greaterThan(Uid u) |
int |
hashCode()
Override Object.hashCode.
|
static Uid |
lastResourceUid()
Return a last resource Uid (0:0:0:0:1)
|
boolean |
lessThan(Uid u) |
static Uid |
maxUid()
Return the maximum Uid (7fffffff:7fffffff:7fffffff:7fffffff:7fffffff)
|
static Uid |
minUid()
Return the minimum Uid
(-80000000:-80000000:-80000000:-80000000:-80000000)
|
boolean |
notEquals(Uid u) |
static Uid |
nullUid()
Return a null Uid (0:0:0:0:0)
|
void |
print(java.io.PrintStream strm)
Print a human-readable form of the Uid.
|
java.lang.String |
stringForm() |
java.lang.String |
toString()
Same as stringForm()
|
boolean |
valid()
Is the Uid valid?
|
protected volatile long[] hostAddr
protected volatile int process
protected volatile int sec
protected volatile int other
public static final int UID_SIZE
public Uid()
public Uid(Uid copyFrom)
public Uid(byte[] byteForm)
public Uid(java.lang.String uidString)
public Uid(java.lang.String uidString, boolean errsOk)
public Uid(long[] addr, int processId, int time, int incr)
public int hashCode()
hashCode
in class java.lang.Object
public void print(java.io.PrintStream strm)
public java.lang.String stringForm()
public java.lang.String fileStringForm()
public byte[] getBytes()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getHexPid()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Uid u)
public boolean notEquals(Uid u)
public boolean lessThan(Uid u)
public boolean greaterThan(Uid u)
public final boolean valid()
public static final Uid nullUid()
public static final Uid lastResourceUid()
public static final Uid maxUid()
public static final Uid minUid()