Class UUIDUtils
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic UUIDGenerate new UUID.static UUIDgenerateNewUUID(Instant instant) Generate new UUID for an instant of time.static UUIDgenerateStaticUUID(Instant instant, byte[] data) Generate UUID for instant of time and input data. 
- 
Constructor Details
- 
UUIDUtils
public UUIDUtils() 
 - 
 - 
Method Details
- 
generateNewUUID
Generate new UUID. Each function call returns a new UUID value.UUID version is an implementation detail, and should not be relied on. For now it is UUIDv7, so for increasing instant values, returned UUID is always greater than previous one.
- Returns:
 UUIDv7- Since:
 - 1.15.0
 
 - 
generateNewUUID
Generate new UUID for an instant of time. Each function call returns a new UUID value.UUID version is an implementation detail, and should not be relied on. For now it is UUIDv7, so for increasing instant values, returned UUID is always greater than previous one.
Based on com.github.f4b6a3.uuid.UuidCreator.getTimeOrderedEpoch implementation (MIT License).
- Parameters:
 instant- a given instant- Returns:
 UUIDv7- Since:
 - 1.15.0
 
 - 
generateStaticUUID
Generate UUID for instant of time and input data. Calling function with same arguments always produces the same result.UUID version is an implementation detail, and should not be relied on. For now it is UUIDv7, so for increasing instant values, returned UUID is always greater than previous one. The only difference from RFC 9562 is that least significant bytes are not random, but instead a SHA-1 hash of input data.
Based on com.github.f4b6a3.uuid.UuidCreator.getTimeOrderedEpoch implementation (MIT License).
- Parameters:
 instant- a given instantdata- a given data- Returns:
 UUIDv7- Since:
 - 1.32.0
 
 
 -