Class WorkerIdGenerator


  • public class WorkerIdGenerator
    extends java.lang.Object
    class to generate an unique worker id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int generate()
      generate a new worker id.
      • Methods inherited from class java.lang.Object

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

      • WorkerIdGenerator

        public WorkerIdGenerator()
    • Method Detail

      • generate

        public int generate()
        generate a new worker id.
        Returns:
        returns a new id.