public class ProcessorUtils extends Object
ProcessorUtils provides access to runtime info about processors, that may be overridden by system properties or environment variables.
This can be useful in virtualized environments where the runtime may miss report the available resources.
Modifier and Type | Field and Description |
---|---|
static String |
AVAILABLE_PROCESSORS |
Constructor and Description |
---|
ProcessorUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
availableProcessors()
Returns the number of available processors, from System Property "JETTY_AVAILABLE_PROCESSORS",
or if not set then from environment variable "JETTY_AVAILABLE_PROCESSORS" or if not set then
from
Runtime.availableProcessors() . |
static void |
setAvailableProcessors(int processors) |
public static final String AVAILABLE_PROCESSORS
public static int availableProcessors()
Runtime.availableProcessors()
.public static void setAvailableProcessors(int processors)
Copyright © 2010 - 2020 Adobe. All Rights Reserved