|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.id.uuid.state.Node
public class Node
The Node
class represents the data and accessors for a single
node identifier. The node id is generally the IEEE 802 address, the clock
sequence, and last timestamp generated are all attributes of a node that need
to be maintained.
Constructor Summary | |
---|---|
Node(byte[] nodeId)
Constructor used to create a |
|
Node(byte[] nodeId,
long lastTime,
short clockSeq)
Constructor used to create a |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object compareTo)
Returns true if the identifier value in this Node is equal to the identifier value in the compare to Node. |
short |
getClockSequence()
Returns the clock sequence used in this node. |
long |
getLastTimestamp()
Returns the last uuid timestamp from this Node . |
byte[] |
getNodeIdentifier()
Returns the node identifier bytes for this node. |
long |
getUUIDTime()
Returns the time in UUID time. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Node(byte[] nodeId)
Constructor used to create a
nodeId
- the byte array representing this nodes identifier.
Usually the IEEE 802 address bytes.public Node(byte[] nodeId, long lastTime, short clockSeq)
Constructor used to create a
nodeId
- the byte array representing this nodes identifier.
Usually the IEEE 802 address bytes.lastTime
- the last timestamp this Node
used.clockSeq
- the last clock sequence used in generation from this node.Method Detail |
---|
public byte[] getNodeIdentifier()
Returns the node identifier bytes for this node.
public short getClockSequence()
Returns the clock sequence used in this node.
public long getUUIDTime() throws OverClockedException
Returns the time in UUID time.
OverClockedException
- the max number of timestamps generated in
this interval has been exceeded.public boolean equals(java.lang.Object compareTo)
Returns true if the identifier value in this Node is equal to the identifier value in the compare to Node.
equals
in class java.lang.Object
compareTo
- the Node to compare for equivalence.
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public long getLastTimestamp()
Returns the last uuid timestamp from this Node
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |