org.random.rjgodoy.trng
Class MH_PoolDaemon

java.lang.Object
  extended by org.random.rjgodoy.trng.MH_PoolDaemon

public class MH_PoolDaemon
extends Object

Provides information and configuration of the pool daemon.

The pool daemon is a thread which fetches some bits from the remote source whenever the quota is 1.000.000

Author:
Javier Godoy

Field Summary
(package private) static long blockSize
           
(package private) static long poolSize
           
(package private) static boolean running
           
 
Constructor Summary
MH_PoolDaemon()
           
 
Method Summary
static long getBlockSize()
          Returns the amount of bits that will be collected.
static long getPoolSize()
          Return the amount of bits available in the pool.
static boolean isRunning()
          Returns whether the PoolDaemon is running
static void setBlockSize(long blockSize)
          Sets the amount of bits that will be collected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

running

static boolean running

blockSize

static long blockSize

poolSize

static long poolSize
Constructor Detail

MH_PoolDaemon

public MH_PoolDaemon()
Method Detail

isRunning

public static boolean isRunning()
Returns whether the PoolDaemon is running

Returns:
true if the pool daemon is running, false otherwise.

getBlockSize

public static long getBlockSize()
Returns the amount of bits that will be collected.

Collection is only performed when the quota is 1.000.000.

Returns:
What I have just said.

getPoolSize

public static long getPoolSize()
Return the amount of bits available in the pool.

Returns:
What I have just said (note they are bits, not bytes).

setBlockSize

public static void setBlockSize(long blockSize)
Sets the amount of bits that will be collected.

Collection is only performed when the quota is 1.000.000. The value must be non-negative and lower or equal than 200.000 (0 will disable the pooling, but it will not kill the daemon). The default value is 200.000.

Parameters:
blockSize - the amount of bits that will be collected.
Throws:
IllegalArgumentException - if the value is negative or greater than 200.000


Submit a bug or request a featureCopyright © (2008-2011) Roberto Javier Godoy
Project Web Hosted by SourceForge.netSouceForge.net is registered trademark of SourceForge, Inc., in the United States and other countries.