Exception: Petra::LockError
- Inherits:
-
HandlerException
- Object
- StandardError
- PetraError
- ExtendedError
- HandlerException
- Petra::LockError
- Defined in:
- lib/petra/exceptions.rb
Overview
Used internally when a lock could not be acquired (non-suspending locking)
Instance Attribute Summary collapse
-
#lock_name ⇒ Object
readonly
Returns the value of attribute lock_name.
-
#lock_type ⇒ Object
readonly
Returns the value of attribute lock_type.
Instance Method Summary collapse
-
#initialize(lock_type: 'general', lock_name: 'general', processed: false) ⇒ LockError
constructor
A new instance of LockError.
- #processed? ⇒ Boolean
Methods inherited from HandlerException
#continuable?, #continue!, #reset_transaction!, #retry!, #rollback_transaction!
Constructor Details
#initialize(lock_type: 'general', lock_name: 'general', processed: false) ⇒ LockError
Returns a new instance of LockError.
147 148 149 150 151 |
# File 'lib/petra/exceptions.rb', line 147 def initialize(lock_type: 'general', lock_name: 'general', processed: false) @lock_type = lock_type @lock_name = lock_name @processed = processed end |
Instance Attribute Details
#lock_name ⇒ Object (readonly)
Returns the value of attribute lock_name.
145 146 147 |
# File 'lib/petra/exceptions.rb', line 145 def lock_name @lock_name end |
#lock_type ⇒ Object (readonly)
Returns the value of attribute lock_type.
144 145 146 |
# File 'lib/petra/exceptions.rb', line 144 def lock_type @lock_type end |
Instance Method Details
#processed? ⇒ Boolean
153 154 155 |
# File 'lib/petra/exceptions.rb', line 153 def processed? @processed end |