Package org.elasticsearch.common
Class UUIDs
- java.lang.Object
-
- org.elasticsearch.common.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 ofbase64UUID()
, 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 privateSecureRandom
instancestatic 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 providedRandom
instancestatic SecureString
randomBase64UUIDSecureString()
Returns a Base64 encodedSecureString
of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a privateSecureRandom
instance
-
-
-
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 ofbase64UUID()
, 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 providedRandom
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 privateSecureRandom
instance
-
randomBase64UUIDSecureString
public static SecureString randomBase64UUIDSecureString()
Returns a Base64 encodedSecureString
of a Version 4.0 compatible UUID as defined here: http://www.ietf.org/rfc/rfc4122.txt, using a privateSecureRandom
instance
-
-