public enum ThreadSelection extends java.lang.Enum<ThreadSelection>
Enum Constant and Description |
---|
AUTO
Automatically select the thread to run operations on based on the return type and/or
Blocking or NonBlocking annotations. |
IO
I/O selection will run all operations regardless of return type and annotations on the I/O thread pool and will never schedule an operation on the server event loop thread.
|
MANUAL
Manual selection leaves it up to the user code to spawn threads to run any blocking I/O operations.
|
Modifier and Type | Method and Description |
---|---|
static ThreadSelection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadSelection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadSelection AUTO
Blocking
or NonBlocking
annotations.
This is the default strategy in 1.x and will run operations on the I/O thread pool if the return type
of the method is not a reactive top and the method is not annotated with NonBlocking
If the return type is a reactive type and the method is not annotated with Blocking
then the server event loop thread will used to run the operation.
public static final ThreadSelection MANUAL
subscribeOn(..)
or by using the Async
annotation or whatever mechanism the user chooses to spawn the additional thread.public static final ThreadSelection IO
public static ThreadSelection[] values()
for (ThreadSelection c : ThreadSelection.values()) System.out.println(c);
public static ThreadSelection valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null