com.plumtree.openfoundation.util
Class XPUUID

java.lang.Object
  extended bycom.plumtree.openfoundation.util.XPUUID

public class XPUUID
extends java.lang.Object

This class provides the capability to generate a UUID. The algorithm used to generate UUIDs supports more than one JVM on one machine. To distinguish between two or more JVMs on one machine, the JVMs have to be initialized during different millisecond intervals or have different classpaths. As input for the UUID generation, the algorithm uses the local IP address, the JVM start time, the JVM classpath, the current time at method invokation and a counter to generate the UUID. IP address, classpath and the JVM start time are used for spatial uniqueness identifying one JVM on a network. The spatial component of the UUID is static and created when the JVM initializes. The current time and counter are used for temporal uniqueness. The class is capable of generating up to 100 unique UUIDs per millisecond. If this bandwith is exceeded, the algorithm waits for one millisecond to ensure uniqueness.

Author:
Bjoern Heckel

Constructor Summary
XPUUID()
           
 
Method Summary
static java.lang.String GenerateUUID()
          Generates a unique identifier that follows Plumtree conventions- it will look something like: {38F78CAD-D28C-4AE8-8718-3A66A21EA04E}, and is guaranteed to be all upper case.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPUUID

public XPUUID()
Method Detail

GenerateUUID

public static java.lang.String GenerateUUID()
Generates a unique identifier that follows Plumtree conventions- it will look something like: {38F78CAD-D28C-4AE8-8718-3A66A21EA04E}, and is guaranteed to be all upper case.

Returns:
the unique identifier


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.