uk.org.ogsadai.common
Class UniqueName

java.lang.Object
  |
  +--uk.org.ogsadai.common.UniqueName

public final class UniqueName
extends java.lang.Object

Provides unique names for use by the system.

T This does not include hardening, so after the JVM is stopped and started again, the naming may not be unique. A timestamp is used as a seed to assist with uniqueness, but uniqueness cannot be guaranteed.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private  long mCurrentName
           
private static UniqueName mUniqueName
           
 
Constructor Summary
private UniqueName()
          Private constructor for singleton pattern.
 
Method Summary
static UniqueName getInstance()
          Returns a singleton instance of this class.
 java.lang.String getName()
          Returns a unique name based on a HEX timestamp seed, of the form ogsadai-100033ad2a7.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

mUniqueName

private static UniqueName mUniqueName

mCurrentName

private long mCurrentName
Constructor Detail

UniqueName

private UniqueName()
Private constructor for singleton pattern.

Method Detail

getInstance

public static UniqueName getInstance()
Returns a singleton instance of this class.

Returns:
singleton instance.

getName

public java.lang.String getName()
Returns a unique name based on a HEX timestamp seed, of the form ogsadai-100033ad2a7.

Returns:
unique name.