Class RuntimeKit
java.lang.Object
com.iohao.net.common.kit.RuntimeKit
Runtime environment utilities.
- Since:
- 21.7
- Author:
- 渔民小镇
- date:
- 2024-05-01
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intNumber of available processors reported by the runtime.static intThe largest power of 2 that does not exceedavailableProcessors. -
Method Summary
-
Field Details
-
availableProcessors
public static int availableProcessorsNumber of available processors reported by the runtime. -
availableProcessors2n
public static int availableProcessors2nThe largest power of 2 that does not exceedavailableProcessors.For example, when
availableProcessorsis 4, 8, 12, 16, or 32, the corresponding value is 4, 8, 8, 16, or 32.
-