class Dynflow::Coordinator::Lock
Public Class Methods
constantize(name)
click to toggle source
# File lib/dynflow/coordinator.rb, line 125 def self.constantize(name) Serializable.constantize(name) rescue NameError # If we don't find the lock name, return the most generic version Lock end
Public Instance Methods
owner_id()
click to toggle source
# File lib/dynflow/coordinator.rb, line 136 def owner_id @data[:owner_id] end
to_s()
click to toggle source
# File lib/dynflow/coordinator.rb, line 132 def to_s "#{self.class.name}: #{id} by #{owner_id}" end
validate!()
click to toggle source
@api override check to be performed before we try to acquire the lock
Calls superclass method
Dynflow::Coordinator::Record#validate!
# File lib/dynflow/coordinator.rb, line 142 def validate! super raise "Can't acquire the lock after deserialization" if @from_hash Type! owner_id, String end