|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Random
java.security.SecureRandom
net.i2p.util.RandomSource
net.i2p.util.PooledRandomSource
public class PooledRandomSource
Maintain a set of PRNGs to feed the apps
Field Summary | |
---|---|
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). |
Fields inherited from class net.i2p.util.RandomSource |
---|
_context |
Constructor Summary | |
---|---|
PooledRandomSource(I2PAppContext context)
Deprecated. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.i2p.util.RandomSource |
---|
feedEntropy, feedEntropy, getInstance, initSeed, loadSeed, main, saveSeed, writeSeed |
Methods inherited from class java.security.SecureRandom |
---|
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getProvider, getSeed, next, setSeed, setSeed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RandomSource[] _pool
protected volatile int _nextPool
public static final int POOL_SIZE
public static final String PROP_BUFFER_SIZE
Constructor Detail |
---|
public PooledRandomSource(I2PAppContext context)
Method Detail |
---|
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()
nextFloat
in class Random
public double nextGaussian()
nextGaussian
in class Random
public int nextInt()
nextInt
in class Random
public long nextLong()
nextLong
in class Random
public EntropyHarvester harvester()
harvester
in class RandomSource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |