Class AtomicLongIdFactory

  • All Implemented Interfaces:
    IdFactory

    public class AtomicLongIdFactory
    extends java.lang.Object
    implements IdFactory
    Implementation of the IdFactory interface, using an AtomicLong. The AtomicLong is initialized with System.currentTimeMillis()*1000 at system start.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String createId()
      creates a new id
      void shutdown()
      shutdown of the factory
      void startup()
      startup of the factory
      • Methods inherited from class java.lang.Object

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

      • AtomicLongIdFactory

        public AtomicLongIdFactory()
    • Method Detail

      • createId

        public java.lang.String createId()
        Description copied from interface: IdFactory
        creates a new id
        Specified by:
        createId in interface IdFactory
        Returns:
        A new id
      • shutdown

        public void shutdown()
        Description copied from interface: IdFactory
        shutdown of the factory
        Specified by:
        shutdown in interface IdFactory
      • startup

        public void startup()
        Description copied from interface: IdFactory
        startup of the factory
        Specified by:
        startup in interface IdFactory