org.sadun.util
Class UniqueIdGenerator

java.lang.Object
  extended byorg.sadun.util.UniqueIdGenerator

public class UniqueIdGenerator
extends java.lang.Object

A generator of IDs unique even across different machines.

Author:
Cristiano Sadun

Constructor Summary
protected UniqueIdGenerator()
           
 
Method Summary
static UniqueIdGenerator getInstance()
          Return the JVM-unique instance of the generator.
 java.lang.String getNextId()
           
 java.lang.String getNextId(java.lang.String hint)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueIdGenerator

protected UniqueIdGenerator()
Method Detail

getInstance

public static UniqueIdGenerator getInstance()
Return the JVM-unique instance of the generator.

Returns:
the JVM-unique instance of the generator.

getNextId

public java.lang.String getNextId(java.lang.String hint)

getNextId

public java.lang.String getNextId()

main

public static void main(java.lang.String[] args)