Top Description Fields Constructors Methods
org.eclipse.jetty.util

public Class ProcessorUtils

extends Object
Class Inheritance

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.

Field Summary

Modifier and TypeField and Description
private static int
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the number of processors
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().

pack-priv static int
init()

public static void
setAvailableProcessors(int processors)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__availableProcessorsback to summary
private static int __availableProcessors
AVAILABLE_PROCESSORSback to summary
public static final String AVAILABLE_PROCESSORS

Constructor Detail

ProcessorUtilsback to summary
public ProcessorUtils()

Method Detail

availableProcessorsback to summary
public 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().

Returns:int

the number of processors

initback to summary
pack-priv static int init()
setAvailableProcessorsback to summary
public static void setAvailableProcessors(int processors)