Top Description Fields Constructors Methods
org.apache.derby.impl.services.uuid

public final Class BasicUUIDFactory

extends Object
implements UUIDFactory
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.uuid.UUIDFactory
Imports
org.apache.derby.iapi.services.monitor.ModuleFactory, .Monitor, org.apache.derby.catalog.UUID, org.apache.derby.iapi.services.uuid.UUIDFactory

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

Modifier and TypeField and Description
private long
private static final long
private long
private static final long
private static final long
private static final long
private long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public synchronized UUID
private static ModuleFactory
getMonitor()

Must be private so that user code can't call this entry point.

public UUID
recreateUUID(String
A UUID as a string
uuidstring
)

Implements org.apache.derby.iapi.services.uuid.UUIDFactory.recreateUUID.

Recreate a UUID previously generated UUID value.

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentValueback to summary
private long currentValue
INITIAL_VALUEback to summary
private static final long INITIAL_VALUE
majorIdback to summary
private long majorId
MODULUSback to summary
private static final long MODULUS
MULTIPLIERback to summary
private static final long MULTIPLIER
STEPback to summary
private static final long STEP
timemillisback to summary
private long timemillis

Constructor Detail

BasicUUIDFactoryback to summary
public BasicUUIDFactory()

Method Detail

bumpMajorback to summary
private void bumpMajor()
createUUIDback to summary
public synchronized UUID createUUID()

Implements org.apache.derby.iapi.services.uuid.UUIDFactory.createUUID.

Generate a new UUID.

Returns:UUID

Doc from org.apache.derby.iapi.services.uuid.UUIDFactory.createUUID.

The UUID.

See Also
UUIDFactory#createUUID
getMonitorback to summary
private static ModuleFactory getMonitor()

Must be private so that user code can't call this entry point.

recreateUUIDback to summary
public UUID recreateUUID(String uuidstring)

Implements org.apache.derby.iapi.services.uuid.UUIDFactory.recreateUUID.

Recreate a UUID previously generated UUID value.

Parameters
uuidstring:String

Doc from org.apache.derby.iapi.services.uuid.UUIDFactory.recreateUUID.

A UUID as a string

Returns:UUID

Doc from org.apache.derby.iapi.services.uuid.UUIDFactory.recreateUUID.

The UUID.

See Also
UUIDFactory#recreateUUID
resetCountersback to summary
private void resetCounters()