Module com.github.f4b6a3.uuid
Class DefaultRandomFunction
- java.lang.Object
-
- com.github.f4b6a3.uuid.factory.function.impl.DefaultRandomFunction
-
- All Implemented Interfaces:
RandomFunction,IntFunction<byte[]>
public final class DefaultRandomFunction extends Object implements RandomFunction
Function that returns an array of bytes with the given length.The current implementation uses a pool
SecureRandom.The pool size is equal to the number of processors available, up to a maximum of 32.
The PRNG algorithm can be specified by system property or environment variable. See
RandomUtil.newSecureRandom().- See Also:
RandomFunction,RandomUtil.newSecureRandom()
-
-
Constructor Summary
Constructors Constructor Description DefaultRandomFunction()
-
-
-
Method Detail
-
apply
public byte[] apply(int length)
- Specified by:
applyin interfaceIntFunction<byte[]>
-
-