DispatchStrategy enum
How WorkerPool chooses a worker for an event or a request.
Values
- broadcast → const DispatchStrategy
-
Every event goes to every ready worker. A request cannot be broadcast: it would have several answers.
- roundRobin → const DispatchStrategy
-
The next ready worker in order.
- keyed → const DispatchStrategy
-
A key selects one worker. By default the key is the topic path, so every event of a topic keeps its worker and its order. A custom
keySelectorreplaces it. - leastBusy → const DispatchStrategy
-
The ready worker with the fewest in-flight requests.
- single → const DispatchStrategy
-
One active worker; a ready standby takes over when the active one dies.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
DispatchStrategy> - A constant List of the values in this enum, in order of their declaration.