Class UUIDs

java.lang.Object
org.elasticsearch.common.UUIDs

public class UUIDs extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    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 String
    Legacy implementation of base64UUID(), for pre 6.0 indices.
    static String
    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 String
    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
    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 Details

    • UUIDs

      public UUIDs()
  • Method Details

    • base64UUID

      public static 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 String legacyBase64UUID()
      Legacy implementation of base64UUID(), for pre 6.0 indices.
    • randomBase64UUID

      public static String randomBase64UUID(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 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