Class: DispatchPolicy::Gate
- Inherits:
-
Object
- Object
- DispatchPolicy::Gate
- Defined in:
- lib/dispatch_policy/gate.rb
Direct Known Subclasses
DispatchPolicy::Gates::AdaptiveConcurrency, DispatchPolicy::Gates::Concurrency, DispatchPolicy::Gates::Throttle
Instance Method Summary collapse
-
#consume(_decision, _admitted_count) ⇒ Object
Called after a successful admit to update gate-local state.
- #evaluate(_ctx, _partition, _admit_budget) ⇒ DispatchPolicy::Decision
- #name ⇒ Object
Instance Method Details
#consume(_decision, _admitted_count) ⇒ Object
Called after a successful admit to update gate-local state. Returns a hash patch to merge into partition.gate_state, or nil.
19 |
# File 'lib/dispatch_policy/gate.rb', line 19 def consume(_decision, _admitted_count); nil; end |
#evaluate(_ctx, _partition, _admit_budget) ⇒ DispatchPolicy::Decision
13 14 15 |
# File 'lib/dispatch_policy/gate.rb', line 13 def evaluate(_ctx, _partition, _admit_budget) raise NotImplementedError end |
#name ⇒ Object
5 6 7 |
# File 'lib/dispatch_policy/gate.rb', line 5 def name raise NotImplementedError end |