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
Modifier and TypeFieldDescriptionstatic final int
The number of bits available after providing to the master server.static final long
The delay after an error occurs.static final long
The minimum interval between calls togetMasterEntropyNeeded()
.static final int
The number of bits below which haveged will be automatically installed.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.static final int
The number of bits available where will obtain from master server when haveged is not supported or is not currently installed.static final int
The number of bits available where will obtain from master server when haveged is supported and installed.static final int
The number of bits available where will provide to master server. -
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:
-
PROVIDE_THRESHOLD
public static final int PROVIDE_THRESHOLDThe number of bits available where will provide to master server.This is scaled from an expected pool size of
4096
. See/proc/sys/kernel/random/poolsize
- See Also:
-
DESIRED_BITS
public static final int DESIRED_BITSThe number of bits available after providing to the master server.This is scaled from an expected pool size of
4096
. See/proc/sys/kernel/random/poolsize
- See Also:
-
OBTAIN_THRESHOLD_NO_HAVEGED
public static final int OBTAIN_THRESHOLD_NO_HAVEGEDThe number of bits available where will obtain from master server when haveged is not supported or is not currently installed.This is scaled from an expected pool size of
4096
. See/proc/sys/kernel/random/poolsize
- See Also:
-
HAVEGED_THRESHOLD
public static final int HAVEGED_THRESHOLDThe number of bits below which haveged will be automatically installed. This is an attempt to keep the system non-blocking with good entropy.This matches the default number of bits where haveged kicks-in (
-w 1024
).- See Also:
-
OBTAIN_THRESHOLD_WITH_HAVEGED
public static final int OBTAIN_THRESHOLD_WITH_HAVEGEDThe number of bits available where will obtain from master server when haveged is supported and installed. We try to let haveged take care of things before pulling from the master.This is scaled from an expected pool size of
4096
. See/proc/sys/kernel/random/poolsize
- See Also:
-
-
Method Details
-
run
public void run() -
start
- Throws:
IOException
SQLException
-