Class ThreadHelpers

java.lang.Object
io.deephaven.util.thread.ThreadHelpers

public class ThreadHelpers extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    getOrComputeThreadCountProperty(String configKey, int defaultValue)
    Get the number of threads to use for a given configuration key, defaulting to the number of available processors if the configuration key is set to a non-positive value, or the configuration key is not set and the provided default is non-positive.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadHelpers

      public ThreadHelpers()
  • Method Details

    • getOrComputeThreadCountProperty

      public static int getOrComputeThreadCountProperty(String configKey, int defaultValue)
      Get the number of threads to use for a given configuration key, defaulting to the number of available processors if the configuration key is set to a non-positive value, or the configuration key is not set and the provided default is non-positive.
      Parameters:
      configKey - The configuration key to look up
      defaultValue - The default value to use if the configuration key is not set
      Returns:
      The number of threads to use