Class ToUUID
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_uuid.ToUUID
- All Implemented Interfaces:
LongFunction<UUID>
This function creates a non-random UUID in the type 4 version (Random).
It always puts the same value in the MSB position of the UUID format.
The input value is put in the LSB position.
This function is suitable for deterministic testing of scenarios which depend
on type 4 UUIDs, but without the mandated randomness that makes testing difficult.
Just be aware that the MSB will always contain value 0x0123456789ABCDEFL unless you
specify a different long value to pre-fill it with.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ToUUID
public ToUUID() -
ToUUID
public ToUUID(long msbs)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceLongFunction<UUID>
-