ThreadLocalRandom may not be a great idea if you are using Virtual Threads (#611).
Java 17+ has a new RandomGenerator and we could allow users to choose via config which generator to use.
RandomGenerator random = RandomGenerator.of("L64X128MixRandom")
List of algorithms:
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/package-summary.html#algorithms
We could have a centralised util function to get a generator. Java 8-16 users would get a ThreadLocalRandominstance when this functio was called. Java 17+ users - we could use Reflection or MethodHandles to create a generator based on config.
ThreadLocalRandom may not be a great idea if you are using Virtual Threads (#611).
Java 17+ has a new RandomGenerator and we could allow users to choose via config which generator to use.
List of algorithms:
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/random/package-summary.html#algorithms
We could have a centralised util function to get a generator. Java 8-16 users would get a ThreadLocalRandominstance when this functio was called. Java 17+ users - we could use Reflection or MethodHandles to create a generator based on config.