org.jppf.utils
Class JPPFUuid

java.lang.Object
  extended by org.jppf.utils.JPPFUuid
All Implemented Interfaces:
Serializable

public class JPPFUuid
extends Object
implements Serializable

Instances of this class serve as unique identifiers for messages sent to and from remote execution services. The identifier is generated as a string with the following elements:

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
static String[] ALPHA_NUM
          Set of characters used to compose a uuid, including only alphanumeric characters.
static String[] ALPHABET_SUPERSET
          Set of characters used to compose a uuid, including more than alphanumeric characters.
static String[] DECIMAL
          Set of characters used to compose a uuid, including only decimal digits.
static String[] HEXADECIMAL
          Set of characters used to compose a uuid, including only hexadecimal digits.
 
Constructor Summary
JPPFUuid()
          Instanciate this JPPFUuid with a generated unique identifier.
JPPFUuid(String[] codes, int length)
          Instanciate this JPPFUuid with a generated unique identifier.
 
Method Summary
 String toString()
          Get a string representation of the generated unique identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALPHABET_SUPERSET

public static final String[] ALPHABET_SUPERSET
Set of characters used to compose a uuid, including more than alphanumeric characters.


ALPHA_NUM

public static final String[] ALPHA_NUM
Set of characters used to compose a uuid, including only alphanumeric characters.


HEXADECIMAL

public static final String[] HEXADECIMAL
Set of characters used to compose a uuid, including only hexadecimal digits.


DECIMAL

public static final String[] DECIMAL
Set of characters used to compose a uuid, including only decimal digits.

Constructor Detail

JPPFUuid

public JPPFUuid()
Instanciate this JPPFUuid with a generated unique identifier.


JPPFUuid

public JPPFUuid(String[] codes,
                int length)
Instanciate this JPPFUuid with a generated unique identifier.

Parameters:
codes - the set of codes from which to choose randomly to build the uuid.
length - number of codes to use to build the uuid.
Method Detail

toString

public String toString()
Get a string representation of the generated unique identifier.

Overrides:
toString in class Object
Returns:
a string containing the uuid.
See Also:
Object.toString()


Copyright © 2005-2010 JPPF Team.