public final class RandomUtils
extends java.lang.Object
ThreadLocalRandom if java version is 1.7 and higher, as it's
expected that there is contention when creating ids. If we are in Java 6 we'll use normal random
that is thread-safe but can be slower.| Modifier and Type | Method and Description |
|---|---|
static long |
randomLong()
Returns the random long number.
|
public static long randomLong()
Random.nextLong() method, this utility method
may return all possible long values (64-bit spread, compared to 48-bit spread defined by the
Random interface).Random returned by the getRandom().