Class NUID


  • public final class NUID
    extends java.lang.Object
    A highly performant unique identifier generator. The library uses this to generate an inbox for request-replies. Applications can use their own NUID to generate subjects as well. A shareable Global instance is also available via nextGlobal().
    • Constructor Summary

      Constructors 
      Constructor Description
      NUID()
      The default NUID constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String next()
      Generate the next NUID string from this instance.
      static java.lang.String nextGlobal()  
      • Methods inherited from class java.lang.Object

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

      • NUID

        public NUID()
        The default NUID constructor. Relies on the SHA1PRNG instance of SecureRandom.
        Throws:
        java.lang.IllegalStateException - if the class cannot find the necessary SecureRandom instance.
    • Method Detail

      • nextGlobal

        public static java.lang.String nextGlobal()
        Returns:
        the next NUID string from a shared global NUID instance
      • next

        public final java.lang.String next()
        Generate the next NUID string from this instance.
        Returns:
        the next NUID string from this instance.