Class: Dynflow::Coordinator::WorldInvalidationLock

Inherits:
LockByWorld show all
Defined in:
lib/dynflow/coordinator.rb

Constant Summary

Constants inherited from Serializable

Serializable::LEGACY_TIME_FORMAT, Serializable::TIME_FORMAT

Instance Attribute Summary

Attributes inherited from Record

#data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LockByWorld

inherited, unique_filter, valid_classes, valid_owner_ids, #validate!, #world_id

Methods inherited from Lock

constantize, #owner_id, #to_s, #unlock_on_shutdown?, #validate!

Methods inherited from Record

#==, constantize, #from_hash, #hash, #id, new_from_hash, #to_hash, #to_s, #validate!

Methods inherited from Serializable

constantize, from_hash, new_from_hash, #to_hash

Constructor Details

#initialize(world, invalidated_world) ⇒ WorldInvalidationLock

Returns a new instance of WorldInvalidationLock.



214
215
216
217
# File 'lib/dynflow/coordinator.rb', line 214

def initialize(world, invalidated_world)
  super(world)
  @data[:id] = self.class.lock_id(invalidated_world.id)
end

Class Method Details

.lock_id(invalidated_world_id) ⇒ Object



219
220
221
# File 'lib/dynflow/coordinator.rb', line 219

def self.lock_id(invalidated_world_id)
  "world-invalidation:#{invalidated_world_id}"
end