|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.ducc.common.utils.id.ADuccId
public class ADuccId
This class provudes a unique identifier to various DUCC objects. It is used to uniquely identify DUCC Jobs, Reservations, Registered Services, Service Instances, Arbitrary Processes, resource shares, and so on. A DuccId consists of two fields, A UUID which is usually hidden, and which is used internally, and a "friendly", numeric id, intended for better consumption by human beings. The DuccId implements its own compareTo(), hashCode() and equals() methods and should be used as a primitive object by all internal DUCC components. When exposing a DuccId to the world, use the "friendly" id.
Constructor Summary | |
---|---|
ADuccId(long given)
Constructor - create a UNIQUE id, presenting a specific "frienly" id as needed. |
Method Summary | |
---|---|
int |
compareTo(Object id)
|
boolean |
equals(Object obj)
|
long |
getFriendly()
Return the (not unique) "friendly" id. |
String |
getUnique()
|
UUID |
getUUID()
|
int |
hashCode()
|
void |
setFriendly(long myFriendly)
Set a friendly id. |
void |
setUUID(UUID unique)
Create a DuccId from a given UUID. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ADuccId(long given)
given
- This is the "friendly" id which may not be unique.Method Detail |
---|
public void setUUID(UUID unique)
unique
- This is a unique ID which overrides the generated UUID from the constructor.
Use with care.public UUID getUUID()
public int compareTo(Object id)
compareTo
in interface Comparable
public int hashCode()
hashCode
in class Object
public long getFriendly()
getFriendly
in interface IDuccId
public void setFriendly(long myFriendly)
myFriendly
- The "friendly" id to associate with the UUID.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public String getUnique()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |