class Dynflow::Coordinator::Lock

Public Class Methods

constantize(name) click to toggle source
# File lib/dynflow/coordinator.rb, line 114
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 125
def owner_id
  @data[:owner_id]
end
to_s() click to toggle source
# File lib/dynflow/coordinator.rb, line 121
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 131
def validate!
  super
  raise "Can't acquire the lock after deserialization" if @from_hash
  Type! owner_id, String
end