Package com.framed.core.utils
Enum Class DispatchMode
- All Implemented Interfaces:
Serializable,Comparable<DispatchMode>,Constable
Strategy for how an event bus invokes the handlers registered for an address.
Used by event bus implementations (such as LocalEventBus and
SocketEventBus) to decide on which thread each registered handler runs.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEach handler invocation is submitted to a shared thread pool and runs concurrently.Each handler gets its own single-thread executor, preserving per-handler FIFO ordering.All handlers run sequentially, inline on the calling (publishing) thread. -
Method Summary
Modifier and TypeMethodDescriptionstatic DispatchModeReturns the enum constant of this class with the specified name.static DispatchMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SEQUENTIAL
All handlers run sequentially, inline on the calling (publishing) thread. -
PARALLEL
Each handler invocation is submitted to a shared thread pool and runs concurrently. -
PER_HANDLER
Each handler gets its own single-thread executor, preserving per-handler FIFO ordering.
-
-
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
-
