public final class NettyRuntime
extends java.lang.Object
Runtime.| 限定符和类型 | 方法和说明 |
|---|---|
static int |
availableProcessors()
Get the configured number of available processors.
|
static void |
setAvailableProcessors(int availableProcessors)
Set the number of available processors.
|
public static void setAvailableProcessors(int availableProcessors)
availableProcessors - the number of available processorsjava.lang.IllegalArgumentException - if the specified number of available processors is non-positivejava.lang.IllegalStateException - if the number of available processors is already configuredpublic static int availableProcessors()
Runtime.availableProcessors(). This
can be overridden by setting the system property "io.netty.availableProcessors" or by invoking
setAvailableProcessors(int) before any calls to this method.