Exception: RubyReactor::OrderedLock::WaitError
- Inherits:
-
StandardError
- Object
- StandardError
- RubyReactor::OrderedLock::WaitError
- Defined in:
- lib/ruby_reactor/ordered_lock.rb
Overview
Raised by the gate check when the worker’s nonce is ahead of ‘last_completed + 1`. Carries `retry_after_seconds`, a hint derived from the poison-pill timeout on the blocker nonce.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#last_completed ⇒ Object
readonly
Returns the value of attribute last_completed.
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
-
#retry_after_seconds ⇒ Object
readonly
Returns the value of attribute retry_after_seconds.
Instance Method Summary collapse
-
#initialize(key:, nonce:, last_completed:, retry_after_seconds:) ⇒ WaitError
constructor
A new instance of WaitError.
Constructor Details
#initialize(key:, nonce:, last_completed:, retry_after_seconds:) ⇒ WaitError
Returns a new instance of WaitError.
17 18 19 20 21 22 23 |
# File 'lib/ruby_reactor/ordered_lock.rb', line 17 def initialize(key:, nonce:, last_completed:, retry_after_seconds:) @key = key @nonce = nonce @last_completed = last_completed @retry_after_seconds = retry_after_seconds super("OrderedLock '#{key}' nonce #{nonce} waiting on #{last_completed + 1}") end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
15 16 17 |
# File 'lib/ruby_reactor/ordered_lock.rb', line 15 def key @key end |
#last_completed ⇒ Object (readonly)
Returns the value of attribute last_completed.
15 16 17 |
# File 'lib/ruby_reactor/ordered_lock.rb', line 15 def last_completed @last_completed end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
15 16 17 |
# File 'lib/ruby_reactor/ordered_lock.rb', line 15 def nonce @nonce end |
#retry_after_seconds ⇒ Object (readonly)
Returns the value of attribute retry_after_seconds.
15 16 17 |
# File 'lib/ruby_reactor/ordered_lock.rb', line 15 def retry_after_seconds @retry_after_seconds end |