- public class UuId
- extends Object
Generates a universally unique id number.
- Generica 1.0
- CVS Revision $Id: UuId.java,v 1.4 2004/03/30 10:12:59 norm Exp $
- Dave Sag
Generate a Unique Universal Id Number.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static long generate()
- Generate a Unique Universal Id Number. It does this based on a random
number, with an appended system time in milliseconds, and then an
appended number derived the host IP numbers associated with localhost.
This ensures that within any millisecond interval, for a particular host
machine, there is a 1/2^62 chance of the uuid's ever repeating. It could
be enhanced to actually check for repition but honestly it's overkill I
think. I have tested this on over 1,000,000 iterations and have never
had a repeat.
- the number.
Dave Sag Generica API version 0.5.9 - (prerelease) Copyright © 2003 - 2004 Dave Sag.