public class Hardware extends Object
Modifier and Type | Method and Description |
---|---|
static int |
getNumberCPUCores()
Gets the number of CPU cores (hardware contexts) that the JVM has access to.
|
static long |
getSizeOfPhysicalMemory()
Returns the size of the physical memory in bytes.
|
public static int getNumberCPUCores()
public static long getSizeOfPhysicalMemory()
-1
, if
the size could not be determined.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.