Package gr.zeus.util

Class SimpleUIDGenerator


  • public final class SimpleUIDGenerator
    extends java.lang.Object
    Generates unique ID's within this JVM.

    Since:
    1.0
    Author:
    Gregory Kotsaftis
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getNextUID()
      Always returns a unique number > 0 for the existing VM.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleUIDGenerator

        public SimpleUIDGenerator()
    • Method Detail

      • getNextUID

        public static long getNextUID()
        Always returns a unique number > 0 for the existing VM. This method IS thread safe.

        Returns:
        A unique number > 0 for the existing VM.