Class RandomEntropyManager
java.lang.Object
com.aoindustries.aoserv.daemon.random.RandomEntropyManager
- All Implemented Interfaces:
Runnable
Watches the amount of entropy available in the system, obtains entropy from the master when running low,
provides entropy to the master when has extra.
- Author:
- AO Industries, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
The delay after an error occurs.static final long
The minimum interval between calls togetMasterEntropyNeeded()
.static final long
The maximum delay between scans when at the desired entropy.static final long
The maximum delay between scans when obtaining from the master.static final long
The delay when obtaining from the master is incomplete (master out of entropy).static final long
The minimum delay between scans. -
Method Summary
-
Field Details
-
MIN_DELAY
public static final long MIN_DELAYThe minimum delay between scans.- See Also:
-
MAX_OBTAIN_DELAY
public static final long MAX_OBTAIN_DELAYThe maximum delay between scans when obtaining from the master.- See Also:
-
MAX_OBTAIN_INCOMPLETE_DELAY
public static final long MAX_OBTAIN_INCOMPLETE_DELAYThe delay when obtaining from the master is incomplete (master out of entropy). This is used to avoid hitting the master stupid-hard when it is depleted.- See Also:
-
MAX_DESIRED_DELAY
public static final long MAX_DESIRED_DELAYThe maximum delay between scans when at the desired entropy.- See Also:
-
GET_MASTER_ENTROPY_NEEDED_INTERVAL
public static final long GET_MASTER_ENTROPY_NEEDED_INTERVALThe minimum interval between calls togetMasterEntropyNeeded()
.- See Also:
-
ERROR_DELAY
public static final long ERROR_DELAYThe delay after an error occurs.- See Also:
-
-
Method Details
-
run
public void run() -
start
- Throws:
IOException
SQLException
-