Package io.vertx.core

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 Summary

    Enum Constants
    Enum Constant
    Description
    Tasks are scheduled on the event-loop thread of the vertx instance.
    Tasks are scheduled on threads not managed by the current vertx instance, the nature of the thread is unknown to the vertx instance.
    Tasks are scheduled on a virtual thread, no assumption on whether virtual threads are pooled.
    Tasks are scheduled on a worker pool of platform threads managed by the vertx instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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