Enum Class ExecutionMode
- All Implemented Interfaces:
Serializable,Comparable<ExecutionMode>,Constable
Execution mode for workflow actions.
Determines how an action is executed:
- POOL - Execute on work-stealing pool (default, safe for heavy operations)
- DIRECT - Direct synchronous call (optimization for light operations)
- Since:
- 2.7.0
- Author:
- devteam@scivics-lab.com
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionModefromString(String value) Parses execution mode from string (case-insensitive).static ExecutionModeReturns the enum constant of this class with the specified name.static ExecutionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
POOL
Execute action on work-stealing pool thread.This is the default and recommended mode. Actions execute on real CPU threads from the work-stealing pool, preventing heavy computations from blocking virtual threads.
Use for:
- CPU-intensive operations
- Long-running computations
- Most workflow actions (safe default)
-
DIRECT
Execute action as direct synchronous call.Action executes on the caller thread without going through the actor's message queue or thread pool. Lowest overhead but can block the workflow thread.
Use for:
- Very light operations (getters, setters)
- Logging
- Simple state updates
- When minimal latency is critical
Warning: Heavy operations will block the workflow thread.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromString
Parses execution mode from string (case-insensitive).- Parameters:
value- the string value ("pool", "direct")- Returns:
- the corresponding ExecutionMode, or POOL if null/empty
-