Class UUIDs


  • public class UUIDs
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      UUIDs()  
    • Method Summary

      Modifier and Type Method Description
      static java.lang.String base64UUID()
      Generates a time-based UUID (similar to Flake IDs), which is preferred when generating an ID to be indexed into a Lucene index as primary key.
      static java.lang.String legacyBase64UUID()
      Legacy implementation of base64UUID(), for pre 6.0 indices.
      static java.lang.String randomBase64UUID()
      Returns a Base64 encoded version of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a private SecureRandom instance
      static java.lang.String randomBase64UUID​(java.util.Random random)
      Returns a Base64 encoded version of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using the provided Random instance
      static SecureString randomBase64UUIDSecureString()
      Returns a Base64 encoded SecureString of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a private SecureRandom instance
      • Methods inherited from class java.lang.Object

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

      • UUIDs

        public UUIDs()
    • Method Detail

      • base64UUID

        public static java.lang.String base64UUID()
        Generates a time-based UUID (similar to Flake IDs), which is preferred when generating an ID to be indexed into a Lucene index as primary key. The id is opaque and the implementation is free to change at any time!
      • legacyBase64UUID

        public static java.lang.String legacyBase64UUID()
        Legacy implementation of base64UUID(), for pre 6.0 indices.
      • randomBase64UUID

        public static java.lang.String randomBase64UUID​(java.util.Random random)
        Returns a Base64 encoded version of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using the provided Random instance
      • randomBase64UUID

        public static java.lang.String randomBase64UUID()
        Returns a Base64 encoded version of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a private SecureRandom instance
      • randomBase64UUIDSecureString

        public static SecureString randomBase64UUIDSecureString()
        Returns a Base64 encoded SecureString of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a private SecureRandom instance