Class ToUUID
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_uuid.ToUUID
- All Implemented Interfaces:
java.util.function.LongFunction<java.util.UUID>
public class ToUUID
extends java.lang.Object
implements java.util.function.LongFunction<java.util.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
-
Method Summary
Modifier and Type Method Description java.util.UUIDapply(long value)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ToUUID
public ToUUID() -
ToUUID
public ToUUID(long msbs)
-
-
Method Details
-
apply
public java.util.UUID apply(long value)- Specified by:
applyin interfacejava.util.function.LongFunction<java.util.UUID>
-