net.sf.mmm.util.uuid.api
Class UuidAccess

java.lang.Object
  extended by net.sf.mmm.util.uuid.api.UuidAccess

public final class UuidAccess
extends Object

This is an ugly static accessor for the UuidFactory used to create instances of UUID and allowing to exchange the default implementation.

Since:
1.0.1
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)

Field Summary
private static UuidFactory factory
           
 
Constructor Summary
private UuidAccess()
          The constructor.
 
Method Summary
static UuidFactory getFactory()
          This method gets the UuidFactory used to create UUIDs.
static void setFactory(UuidFactory factory)
          This method sets (overrides) the UuidFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

private static UuidFactory factory
See Also:
getFactory()
Constructor Detail

UuidAccess

private UuidAccess()
The constructor.

Method Detail

getFactory

public static UuidFactory getFactory()
This method gets the UuidFactory used to create UUIDs.

Returns:
the UuidFactory to use.

setFactory

public static void setFactory(UuidFactory factory)
This method sets (overrides) the UuidFactory. This allows to exchange the UuidFactory and thereby the type of the created UUIDs.
ATTENTION:
No synchronization is performed setting the factory instance. This assumes that an assignment is an atomic operation in the JVM you are using. Additionally this method should only be invoked in the initialization phase of your application.

Parameters:
factory - is the factory to set.


Copyright © 2001-2010 mmm-Team. All Rights Reserved.