Uses of Interface
io.github.pr0methean.betterrandom.seed.SeedGenerator
-
Packages that use SeedGenerator Package Description io.github.pr0methean.betterrandom.prng Subclasses ofRandom
using different random-number generation algorithms.io.github.pr0methean.betterrandom.prng.adapter Implementations ofBaseRandom
that are backed by instances ofSplittableRandom
orRandom
, many of them wrapped inThreadLocal
<?>
to allow concurrent use of a shared instance by multiple threads.io.github.pr0methean.betterrandom.seed Tools to obtain and apply truly-random seeds forRandom
implementations, especially those that also implementByteArrayReseedableRandom
. -
-
Uses of SeedGenerator in io.github.pr0methean.betterrandom.prng
Constructors in io.github.pr0methean.betterrandom.prng with parameters of type SeedGenerator Constructor Description AesCounterRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy to create a 256-bit seed.BaseRandom(SeedGenerator randomSeeder, int seedLength)
Creates a new RNG and seeds it using the provided seed generation strategy.Cmwc4096Random(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy.MersenneTwisterRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy.Pcg128Random(SeedGenerator seedGenerator)
Creates a new PRNG with a seed from the providedSeedGenerator
.Pcg64Random(SeedGenerator seedGenerator)
Creates a new PRNG with a seed from the providedSeedGenerator
.XorShiftRandom(SeedGenerator seedGenerator)
Seed the RNG using the provided seed generation strategy. -
Uses of SeedGenerator in io.github.pr0methean.betterrandom.prng.adapter
Methods in io.github.pr0methean.betterrandom.prng.adapter that return SeedGenerator Modifier and Type Method Description SeedGenerator
EntropyBlockingRandomWrapper. getSameThreadSeedGen()
Returns the seed generator that is used on the calling thread if not registered with a runningRandomSeeder
.Methods in io.github.pr0methean.betterrandom.prng.adapter with parameters of type SeedGenerator Modifier and Type Method Description void
EntropyBlockingRandomWrapper. setSameThreadSeedGen(SeedGenerator newSeedGen)
Sets the seed generator that is used on the calling thread if not registered with a runningRandomSeeder
.static EntropyBlockingRandomWrapper<Random>
EntropyBlockingRandomWrapper. wrapJavaUtilRandom(long minimumEntropy, byte[] seed, SeedGenerator sameThreadSeedGen)
Creates an instance wrapping a basicRandom
.static EntropyBlockingRandomWrapper<Random>
EntropyBlockingRandomWrapper. wrapJavaUtilRandom(long minimumEntropy, SeedGenerator seedGenerator)
Creates an instance wrapping a basicRandom
.static RandomWrapper<Random>
RandomWrapper. wrapJavaUtilRandom(SeedGenerator seedGenerator)
Creates an instance wrapping a basicRandom
.static ReseedingThreadLocalRandomWrapper<BaseRandom>
ReseedingThreadLocalRandomWrapper. wrapLegacy(SerializableLongFunction<Random> legacyCreator, SeedGenerator seedGenerator)
Uses this class andRandomWrapper
to decorate any implementation ofRandom
that can be constructed from along
seed into a fully-concurrent one.static ThreadLocalRandomWrapper<BaseRandom>
ThreadLocalRandomWrapper. wrapLegacy(SerializableLongFunction<Random> legacyCreator, SeedGenerator seedGenerator)
Uses this class andRandomWrapper
to decorate any implementation ofRandom
that can be constructed from along
seed into a fully-concurrent one.Constructors in io.github.pr0methean.betterrandom.prng.adapter with parameters of type SeedGenerator Constructor Description EntropyBlockingRandomWrapper(T wrapped, long minimumEntropy, SeedGenerator sameThreadSeedGen)
EntropyBlockingSplittableRandomAdapter(SeedGenerator seedGenerator, RandomSeeder randomSeeder, long minimumEntropy)
Creates an instance.ReseedingThreadLocalRandomWrapper(int seedSize, SeedGenerator seedGenerator, SerializableFunction<byte[],? extends T> creator)
Wraps a seed generator and a function that takes a seed byte array as input.ReseedingThreadLocalRandomWrapper(SeedGenerator seedGenerator, SerializableSupplier<? extends T> initializer)
Wraps the givenSerializableSupplier
.SingleThreadSplittableRandomAdapter(SeedGenerator seedGenerator)
Use the provided seed generation strategy to create the seed for theSplittableRandom
.SplittableRandomAdapter(SeedGenerator seedGenerator)
Creates an instance that uses the sameSeedGenerator
for reseeding and for initial seeding, and whoseRandomSeeder
uses aRandomSeeder.DefaultThreadFactory
.SplittableRandomAdapter(SeedGenerator seedGenerator, RandomSeeder randomSeeder)
Creates an instance.ThreadLocalRandomWrapper(int seedSize, SeedGenerator seedGenerator, SerializableFunction<byte[],? extends T> creator)
Wraps a seed generator and a function that takes a seed byte array as input. -
Uses of SeedGenerator in io.github.pr0methean.betterrandom.seed
Classes in io.github.pr0methean.betterrandom.seed that implement SeedGenerator Modifier and Type Class Description class
AnuQuantumSeedClient
API client for the Australian National University's quantum RNG, which extracts randomness from quantum-vacuum fluctuations.class
BufferedSeedGenerator
A seed generator that wraps another, maintaining a buffer of previously-fetched bytes to reduce the number of I/O calls.class
DefaultSeedGenerator
Seed generator that is the default for the program where it is running.class
DevRandomSeedGenerator
RNG seed strategy that gets data from/dev/random
on systems that provide it (e.g.class
RandomDotOrgAnonymousClient
Connects to random.org's old API (via HTTPS) and downloads a set of random bits to use as seed data.class
RandomDotOrgApi2Client
Uses the random.org JSON API documented at api.random.org.class
SecureRandomSeedGenerator
SeedGenerator
implementation that uses Java's bundledSecureRandom
RNG to generate random seed data.class
SeedGeneratorPreferenceList
ASeedGenerator
implementation that iterates over multiple delegates until one succeeds.class
WebSeedClient
ASeedGenerator
that is a client for a Web random-number service.Fields in io.github.pr0methean.betterrandom.seed declared as SeedGenerator Modifier and Type Field Description protected SeedGenerator
RandomSeeder. seedGenerator
The seed generator this seeder uses.Methods in io.github.pr0methean.betterrandom.seed that return SeedGenerator Modifier and Type Method Description static SeedGenerator
DefaultSeedGenerator. get()
Returns the current delegate used by this class's singleton instance.SeedGenerator
RandomSeeder. getSeedGenerator()
Returns theSeedGenerator
this seeder uses.Methods in io.github.pr0methean.betterrandom.seed with parameters of type SeedGenerator Modifier and Type Method Description void
SeedGeneratorPreferenceList.Builder. add(SeedGenerator... seedGenerators)
static void
DefaultSeedGenerator. set(SeedGenerator delegate)
Sets the default seed generator (a delegate used by this class's singleton instance).Method parameters in io.github.pr0methean.betterrandom.seed with type arguments of type SeedGenerator Modifier and Type Method Description void
SeedGeneratorPreferenceList.Builder. addAll(Iterable<? extends SeedGenerator> seedGenerators)
Constructors in io.github.pr0methean.betterrandom.seed with parameters of type SeedGenerator Constructor Description BufferedSeedGenerator(SeedGenerator delegate, int size)
Creates an instance.LegacyRandomSeeder(SeedGenerator seedGenerator)
Creates an instance using aRandomSeeder.DefaultThreadFactory
.LegacyRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory)
Creates an instance whose thread will terminate if no PRNGs have been associated with it for 5 seconds.LegacyRandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory, long stopIfEmptyForNanos)
Creates an instance.RandomSeeder(SeedGenerator seedGenerator)
Creates an instance using aRandomSeeder.DefaultThreadFactory
.RandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory)
Creates an instance whose thread will terminate if no PRNGs have been associated with it for 5 seconds.RandomSeeder(SeedGenerator seedGenerator, ThreadFactory threadFactory, long stopIfEmptyForNanos)
Creates an instance.SeedGeneratorPreferenceList(boolean isAlwaysWorthTrying, SeedGenerator... contents)
Creates an instance.Constructor parameters in io.github.pr0methean.betterrandom.seed with type arguments of type SeedGenerator Constructor Description SeedGeneratorPreferenceList(Collection<? extends SeedGenerator> delegates, boolean isAlwaysWorthTrying)
Creates an instance.
-