Package com.seeq.utilities
Class UUIDs
java.lang.Object
com.seeq.utilities.UUIDs
Collection of methods for interacting with and generating UUIDs
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ID_PATTERN
-
-
Constructor Details
-
UUIDs
public UUIDs()
-
-
Method Details
-
randomBase64Guid
Generates a random base64 guid- Returns:
- the random base64 guid
-
timeOrderedUUID
Generates a time ordered UUID, also known as UUID v6. This type of UUID is well-suited for database primary keys, since it starts with a monotonically increasing timestamp.Our implementation makes the least significant bits completely random, since we have no use for a node identifier or clock sequence, and we have some code that depends on the LSB being random. This also means that we don't need to block when two entries have the same millisecond timestamp, as the randomness will distinguish them.
See Peabody for more information.
-
fromConcatenatedUUIDs
Generates a UUID from a concatenation of two other UUIDs.
-