Package ca.uhn.hl7v2.util.idgenerator
Class NanoTimeGenerator
java.lang.Object
ca.uhn.hl7v2.util.idgenerator.NanoTimeGenerator
- All Implemented Interfaces:
IDGenerator
ID generator that simply returns the return value of System.nanoTime(). If ID
generation happens too fast, there may be duplicate IDs, therefore the generation
is delayed by 1ms.
- Author:
- Christian Ohr
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.hl7v2.util.idgenerator.IDGenerator
IDGenerator.Ordered, IDGenerator.OrderedSupport -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NanoTimeGenerator
public NanoTimeGenerator()
-
-
Method Details
-
getID
Description copied from interface:IDGeneratorGenerates and returns a new ID. Note: This method must be implemented to be thread-safe.- Specified by:
getIDin interfaceIDGenerator- Returns:
- a new ID.
-