Enum ThreadingModel

java.lang.Object
java.lang.Enum<ThreadingModel>
io.vertx.core.ThreadingModel
All Implemented Interfaces:
Serializable, Comparable<ThreadingModel>

public enum ThreadingModel extends Enum<ThreadingModel>
The threading model defines the scheduler to execute context tasks.
Author:
Julien Viet
  • Enum Constant Details

    • EVENT_LOOP

      public static final ThreadingModel EVENT_LOOP
      Tasks are scheduled on the event-loop thread of the vertx instance.
    • WORKER

      public static final ThreadingModel WORKER
      Tasks are scheduled on a worker pool of platform threads managed by the vertx instance.
    • VIRTUAL_THREAD

      public static final ThreadingModel VIRTUAL_THREAD
      Tasks are scheduled on a virtual thread, no assumption on whether virtual threads are pooled.
    • EXTERNAL

      public static final ThreadingModel EXTERNAL
      Tasks are scheduled on threads not managed by the current vertx instance, the nature of the thread is unknown to the vertx instance. An event-loop thread of another vertx instance falls in this category.
  • Method Details

    • values

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

      public static ThreadingModel valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null