Exception: Petra::LockError

Inherits:
HandlerException show all
Defined in:
lib/petra/exceptions.rb

Overview

Used internally when a lock could not be acquired (non-suspending locking)

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_typeObject (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

Returns:

  • (Boolean)


153
154
155
# File 'lib/petra/exceptions.rb', line 153

def processed?
  @processed
end