|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.services.uuid.BasicUUIDFactory
public final class BasicUUIDFactory
A hack implementation of something similar to a DCE UUID generator. Generates unique 128-bit numbers based on the current machine's internet address, the current time, and a sequence number. This implementation should be made to conform to the DCE specification. ("DEC/HP, Network Computing Architecture, Remote Procedure Call Runtime Extensions Specification, version OSF TX1.0.11," Steven Miller, July 23, 1992. This is part of the OSF DCE Documentation. Chapter 10 describes the UUID generation algorithm.)
Some known deficiencies:
However, the intention is that UUIDs generated from this class will be unique with respect to UUIDs generated by other DCE UUID generators.
Field Summary | |
---|---|
private long |
currentValue
|
private static long |
INITIAL_VALUE
|
private long |
majorId
|
private static long |
MODULUS
|
private static long |
MULTIPLIER
|
private static long |
STEP
|
private long |
timemillis
|
Constructor Summary | |
---|---|
BasicUUIDFactory()
|
Method Summary | |
---|---|
private void |
bumpMajor()
|
UUID |
createUUID()
Generate a new UUID. |
UUID |
recreateUUID(byte[] b)
Recreate a UUID from a byte array produced by UUID.toByteArray. |
UUID |
recreateUUID(java.lang.String uuidstring)
Recreate a UUID previously generated UUID value. |
private void |
resetCounters()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long majorId
private long timemillis
private static final long MODULUS
private static final long MULTIPLIER
private static final long STEP
private static final long INITIAL_VALUE
private long currentValue
Constructor Detail |
---|
public BasicUUIDFactory()
Method Detail |
---|
public UUID createUUID()
createUUID
in interface UUIDFactory
UUIDFactory.createUUID()
public UUID recreateUUID(java.lang.String uuidstring)
recreateUUID
in interface UUIDFactory
UUIDFactory.recreateUUID(java.lang.String)
public UUID recreateUUID(byte[] b)
UUIDFactory
recreateUUID
in interface UUIDFactory
UUIDFactory.recreateUUID(java.lang.String)
private void bumpMajor()
private void resetCounters()
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |