Serialized Form
-
Package io.github.pr0methean.betterrandom.prng
-
Class io.github.pr0methean.betterrandom.prng.AesCounterRandom extends CipherCounterRandom implements Serializable
- serialVersionUID:
- 4808258824475143174L
-
Class io.github.pr0methean.betterrandom.prng.BaseRandom extends Random implements Serializable
- serialVersionUID:
- -1556392727255964947L
-
Serialization Methods
-
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
readObjectNoData
private void readObjectNoData() throws InvalidObjectException
Do not attempt to deserialize any subclass that wasn't a subclass when serialized.- Throws:
InvalidObjectException
-
-
Serialized Fields
-
entropyBits
AtomicLong entropyBits
Stores the entropy estimate backingBaseRandom.getEntropyBits()
. -
lock
ReentrantLock lock
Lock to prevent concurrent modification of the RNG's internal state. -
nextNextGaussian
AtomicLong nextNextGaussian
-
randomSeeder
AtomicReference<RandomSeeder> randomSeeder
If the referent is non-null, it will be invoked to reseed this PRNG whenever random output is taken andBaseRandom.getEntropyBits()
called immediately afterward would return zero or negative. -
seed
byte[] seed
The seed this PRNG was seeded with, as a byte array. Used byBaseRandom.getSeed()
even if the actual internal state of the PRNG is stored elsewhere (since otherwise getSeed() would require a slow type conversion).
-
-
Class io.github.pr0methean.betterrandom.prng.CipherCounterRandom extends BaseRandom implements Serializable
- serialVersionUID:
- -7872636191973295031L
-
Serialized Fields
-
counter
byte[] counter
The counter. Successive values are encrypted to generate pseudorandom numbers. -
counterInput
byte[] counterInput
-
currentBlock
byte[] currentBlock
An array holding generated, encrypted bytes. -
index
int index
The offset inCipherCounterRandom.currentBlock
to draw output from. -
seeded
boolean seeded
-
-
Class io.github.pr0methean.betterrandom.prng.Cmwc4096Random extends BaseRandom implements Serializable
- serialVersionUID:
- 1731465909906078875L
-
Serialized Fields
-
carry
int carry
-
index
int index
-
state
int[] state
-
-
Class io.github.pr0methean.betterrandom.prng.MersenneTwisterRandom extends BaseRandom implements Serializable
- serialVersionUID:
- -4856906677508460512L
-
Serialized Fields
-
mt
int[] mt
-
mtIndex
int mtIndex
-
-
Class io.github.pr0methean.betterrandom.prng.Pcg128Random extends BaseRandom implements Serializable
- serialVersionUID:
- 3246991464669800351L
-
Serialized Fields
-
advancementLock
Lock advancementLock
-
-
Class io.github.pr0methean.betterrandom.prng.Pcg64Random extends BaseRandom implements Serializable
- serialVersionUID:
- 1677405697790847137L
-
Serialization Methods
-
writeObject
private void writeObject(ObjectOutputStream out) throws IOException
- Throws:
IOException
-
-
Serialized Fields
-
internal
AtomicLong internal
-
-
Class io.github.pr0methean.betterrandom.prng.XorShiftRandom extends BaseRandom implements Serializable
- serialVersionUID:
- 952521144304194886L
-
Serialized Fields
-
state1
int state1
-
state2
int state2
-
state3
int state3
-
state4
int state4
-
state5
int state5
-
-
-
Package io.github.pr0methean.betterrandom.prng.adapter
-
Class io.github.pr0methean.betterrandom.prng.adapter.BaseSplittableRandomAdapter extends BaseRandom implements Serializable
- serialVersionUID:
- 4273652147052638879L
-
Class io.github.pr0methean.betterrandom.prng.adapter.EntropyBlockingRandomWrapper extends RandomWrapper<T extends Random> implements Serializable
- serialVersionUID:
- -853699062122154479L
-
Serialized Fields
-
minimumEntropy
long minimumEntropy
-
sameThreadSeedGen
AtomicReference<SeedGenerator> sameThreadSeedGen
-
seedingStatusChanged
Condition seedingStatusChanged
-
-
Class io.github.pr0methean.betterrandom.prng.adapter.EntropyBlockingSplittableRandomAdapter extends SplittableRandomAdapter implements Serializable
- serialVersionUID:
- -779886405514766937L
-
Serialized Fields
-
minimumEntropy
long minimumEntropy
-
sameThreadSeedGen
AtomicReference<SeedGenerator> sameThreadSeedGen
-
-
Class io.github.pr0methean.betterrandom.prng.adapter.RandomWrapper extends BaseRandom implements Serializable
- serialVersionUID:
- -6526304552538799385L
-
Class io.github.pr0methean.betterrandom.prng.adapter.ReseedingThreadLocalRandomWrapper extends ThreadLocalRandomWrapper<T extends BaseRandom> implements Serializable
- serialVersionUID:
- -3235519018032714059L
-
Class io.github.pr0methean.betterrandom.prng.adapter.SingleThreadSplittableRandomAdapter extends BaseSplittableRandomAdapter implements Serializable
- serialVersionUID:
- -1125374167384636394L
-
Serialization Methods
-
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-
Class io.github.pr0methean.betterrandom.prng.adapter.SplittableRandomAdapter extends BaseSplittableRandomAdapter implements Serializable
- serialVersionUID:
- 6301096404034224037L
-
Serialized Fields
-
seedGenerator
SeedGenerator seedGenerator
-
-
Class io.github.pr0methean.betterrandom.prng.adapter.ThreadLocalRandomWrapper extends RandomWrapper<T extends BaseRandom> implements Serializable
- serialVersionUID:
- 1199235201518562359L
-
Serialization Methods
-
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-
Serialized Fields
-
initializer
SerializableSupplier<? extends T extends BaseRandom> initializer
-
initializerForSeed
SerializableFunction<byte[],? extends T extends BaseRandom> initializerForSeed
-
seedSize
int seedSize
-
-
-
Package io.github.pr0methean.betterrandom.seed
-
Class io.github.pr0methean.betterrandom.seed.AnuQuantumSeedClient extends WebSeedClient implements Serializable
- serialVersionUID:
- -7067446291370465008L
-
Class io.github.pr0methean.betterrandom.seed.BufferedSeedGenerator extends Object implements Serializable
- serialVersionUID:
- -2100305696539110970L
-
Serialization Methods
-
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
-
Serialized Fields
-
delegate
SeedGenerator delegate
-
lock
Lock lock
This could be replaced with a ReentrantReadWriteLock, with buffer consumption using the read lock and refilling using the write lock. However, pos would then have to become an AtomicInteger, so it would be worth the overhead only in rare corner cases with a large number of threads. Furthermore, there would exist a slow path in which the consumption took place under the write lock (when another thread had refilled the buffer while we'd been waiting for the write lock, after initially finding the buffer empty under the read lock); and this slow path would become more frequent as the number of concurrent threads increased, unless the buffer size increased proportionately. Most of these corner cases are best handled by aRandomSeeder
. -
size
int size
-
-
Class io.github.pr0methean.betterrandom.seed.LegacyRandomSeeder extends RandomSeeder implements Serializable
- serialVersionUID:
- 816480836156219842L
-
Class io.github.pr0methean.betterrandom.seed.RandomDotOrgAnonymousClient extends WebSeedClient implements Serializable
- serialVersionUID:
- 2017387159245489913L
-
Class io.github.pr0methean.betterrandom.seed.RandomDotOrgApi2Client extends WebSeedClient implements Serializable
- serialVersionUID:
- 8901705097958111045L
-
Serialized Fields
-
apiKey
UUID apiKey
-
-
Class io.github.pr0methean.betterrandom.seed.RandomSeeder extends Looper implements Serializable
- serialVersionUID:
- -4339570810679373476L
-
Serialized Fields
-
seedGenerator
SeedGenerator seedGenerator
The seed generator this seeder uses. -
stopIfEmptyForNanos
long stopIfEmptyForNanos
Time in nanoseconds after which this thread will terminate if no PRNGs are attached.
-
-
Class io.github.pr0methean.betterrandom.seed.RandomSeeder.DefaultThreadFactory extends Object implements Serializable
- serialVersionUID:
- -5806852086706570346L
-
Serialized Fields
-
name
String name
-
priority
int priority
-
-
Class io.github.pr0methean.betterrandom.seed.SecureRandomSeedGenerator extends Object implements Serializable
- serialVersionUID:
- 854226000048040387L
-
Serialization Methods
-
readResolve
protected Object readResolve()
Ensures that all serialized copies ofSecureRandomSeedGenerator.DEFAULT_INSTANCE
deserialize as the same object.
-
-
Serialized Fields
-
isDefaultInstance
boolean isDefaultInstance
Used to preserve the identity of the default instance across serialization. -
source
SecureRandom source
TheSecureRandom
that generates the seeds.
-
-
Class io.github.pr0methean.betterrandom.seed.SeedException extends RuntimeException implements Serializable
- serialVersionUID:
- -6151013676983010168L
-
Class io.github.pr0methean.betterrandom.seed.SeedGeneratorPreferenceList extends Object implements Serializable
- serialVersionUID:
- -4429919137592899776L
-
Serialized Fields
-
delegates
ImmutableList<SeedGenerator> delegates
-
isAlwaysWorthTrying
boolean isAlwaysWorthTrying
-
-
Class io.github.pr0methean.betterrandom.seed.WebSeedClient extends Object implements Serializable
- serialVersionUID:
- 2216766353219231461L
-
Serialized Fields
-
configuration
WebSeedClientConfiguration configuration
-
earliestNextAttempt
Instant earliestNextAttempt
The earliest time we'll try again if there's been a previous IOE, or when the server requests throttling. -
lock
Lock lock
Held while downloading, so that two requests to the same server won't be pending at the same time. -
userAgent
String userAgent
The value for the HTTP User-Agent header.
-
-
Class io.github.pr0methean.betterrandom.seed.WebSeedClientConfiguration extends Object implements Serializable
- serialVersionUID:
- -5162594092589771385L
-
Serialized Fields
-
retryDelayMs
long retryDelayMs
-
-
-
Package io.github.pr0methean.betterrandom.util
-
Class io.github.pr0methean.betterrandom.util.Looper extends Object implements Serializable
- serialVersionUID:
- -4790652062170305318L
-
Serialization Methods
-
readObject
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
- Throws:
IOException
ClassNotFoundException
-
writeObject
private void writeObject(ObjectOutputStream out) throws IOException
- Throws:
IOException
-
-
Serialized Fields
-
factory
ThreadFactory factory
TheThreadFactory
used to create (and, if necessary, replace) the thread. -
lock
Lock lock
The thread holds this lock whenever it is runningLooper.iterate()
. -
running
boolean running
Determines whether to start when deserialized. -
threadLock
Lock threadLock
The looper holds this lock whenever it is reading or writing the state of the underlying thread (including replacing that thread).
-
-