Class NanoTimeGenerator

java.lang.Object
ca.uhn.hl7v2.util.idgenerator.NanoTimeGenerator
All Implemented Interfaces:
IDGenerator

public class NanoTimeGenerator extends Object implements 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
  • Constructor Details

  • Method Details

    • getID

      public String getID()
      Description copied from interface: IDGenerator
      Generates and returns a new ID. Note: This method must be implemented to be thread-safe.
      Specified by:
      getID in interface IDGenerator
      Returns:
      a new ID.