All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commons.jdkspecific.ProcessorInfo Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.commons.jdkspecific;

/**
 * JDK 10+ implementation
 *
 * @author Tristan Tarrant
 */
public class ProcessorInfo {

   private ProcessorInfo() {
   }

   public static int availableProcessors() {
      int javaProcs = Runtime.getRuntime().availableProcessors();
      int userProcs = Integer.getInteger("infinispan.activeprocessorcount", javaProcs);
      return Math.min(userProcs, javaProcs);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy