public final class NettyRuntime
extends java.lang.Object
Runtime
.Modifier and Type | Method and Description |
---|---|
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.Copyright © 2008–2018 The Netty Project. All rights reserved.