org.jboss.messaging.util
Class UUIDGenerator

java.lang.Object
  extended by org.jboss.messaging.util.UUIDGenerator

public final class UUIDGenerator
extends java.lang.Object


Method Summary
 UUID generateTimeBasedUUID(java.net.InetAddress addr)
           
static UUIDGenerator getInstance()
          Method used for accessing the singleton generator instance.
 java.util.Random getRandomNumberGenerator()
          Method for getting the shared random number generator used for generating the UUIDs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UUIDGenerator getInstance()
Method used for accessing the singleton generator instance.


getRandomNumberGenerator

public java.util.Random getRandomNumberGenerator()
Method for getting the shared random number generator used for generating the UUIDs. This way the initialization cost is only taken once; access need not be synchronized (or in cases where it has to, SecureRandom takes care of it); it might even be good for getting really 'random' stuff to get shared access...


generateTimeBasedUUID

public UUID generateTimeBasedUUID(java.net.InetAddress addr)


Copyright © 2006 JBoss Inc. All Rights Reserved.