net.i2p.util
public class PooledRandomSource extends RandomSource
Modifier and Type | Field and Description |
---|---|
protected int |
_nextPool
Deprecated.
|
protected RandomSource[] |
_pool
Deprecated.
|
static int |
POOL_SIZE
Deprecated.
|
static String |
PROP_BUFFER_SIZE
Deprecated.
How much random data will we precalculate and feed from (as opposed to on demand
reseeding, etc).
|
_context
Constructor and Description |
---|
PooledRandomSource(I2PAppContext context)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
EntropyHarvester |
harvester()
Deprecated.
|
protected void |
initializePool(I2PAppContext context)
Deprecated.
|
boolean |
nextBoolean()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
void |
nextBytes(byte[] buf)
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
double |
nextDouble()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
float |
nextFloat()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
double |
nextGaussian()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
int |
nextInt()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
int |
nextInt(int n)
Deprecated.
According to the java docs (http://java.sun.com/j2se/1.4.1/docs/api/java/util/Random.html#nextInt(int))
nextInt(n) should return a number between 0 and n (including 0 and excluding n).
|
long |
nextLong()
Deprecated.
override as synchronized, for those JVMs that don't always pull via
nextBytes (cough ibm)
|
long |
nextLong(long n)
Deprecated.
Like the modified nextInt, nextLong(n) returns a random number from 0 through n,
including 0, excluding n.
|
feedEntropy, feedEntropy, getInstance, initSeed, loadSeed, main, saveSeed, writeSeed
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getProvider, getSeed, next, setSeed, setSeed
protected RandomSource[] _pool
protected volatile int _nextPool
public static final int POOL_SIZE
public static final String PROP_BUFFER_SIZE
public PooledRandomSource(I2PAppContext context)
protected void initializePool(I2PAppContext context)
public int nextInt(int n)
nextInt
in class RandomSource
public long nextLong(long n)
nextLong
in class RandomSource
public boolean nextBoolean()
nextBoolean
in class Random
public void nextBytes(byte[] buf)
nextBytes
in class SecureRandom
public double nextDouble()
nextDouble
in class Random
public float nextFloat()
public double nextGaussian()
nextGaussian
in class Random
public int nextInt()
public long nextLong()
public EntropyHarvester harvester()
harvester
in class RandomSource