public final class ThreadUtils
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static long | REQUIRED_MEMORY_PER_JOB | 
| Modifier and Type | Method and Description | 
|---|---|
| static int | chooseThreadCount(java.lang.String operation,
                 int jobCount)Choose a thread count taking into account the number of processor cores, the number of jobs and the available
 memory, assuming that each job will need at least approximately  REQUIRED_MEMORY_PER_JOBbytes of memory. | 
| static java.lang.Integer | getMostRecentThreadCount()Get the value most recently returned by  chooseThreadCount(String, int), if any. | 
public static final long REQUIRED_MEMORY_PER_JOB
public static int chooseThreadCount(java.lang.String operation,
                                    int jobCount)
REQUIRED_MEMORY_PER_JOB bytes of memory.operation - The name of the operation for use in the log entry.jobCount - The number of jobs to be executed.public static java.lang.Integer getMostRecentThreadCount()
chooseThreadCount(String, int), if any.