Enum Class Threading

java.lang.Object
java.lang.Enum<Threading>
org.springframework.boot.autoconfigure.thread.Threading
All Implemented Interfaces:
Serializable, Comparable<Threading>, Constable

public enum Threading extends Enum<Threading>
Threading of the application.
Since:
3.2.0
Author:
Moritz Halbritter
  • Enum Constant Details

    • PLATFORM

      public static final Threading PLATFORM
      Platform threads. Active if virtual threads are not active.
    • VIRTUAL

      public static final Threading VIRTUAL
      Virtual threads. Active if spring.threads.virtual.enabled is true and running on Java 21 or later.
  • Method Details

    • values

      public static Threading[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Threading valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isActive

      public abstract boolean isActive(Environment environment)
      Determines whether the threading is active.
      Parameters:
      environment - the environment
      Returns:
      whether the threading is active