Class: Dynflow::Coordinator::PlanningLock
- Inherits:
-
LockByWorld
- Object
- Serializable
- Record
- Lock
- LockByWorld
- Dynflow::Coordinator::PlanningLock
- 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
Class Method Summary collapse
Instance Method Summary collapse
- #execution_plan_id ⇒ Object
-
#initialize(world, execution_plan_id) ⇒ PlanningLock
constructor
A new instance of PlanningLock.
- #unlock_on_shutdown? ⇒ Boolean
Methods inherited from LockByWorld
inherited, unique_filter, valid_classes, valid_owner_ids, #validate!, #world_id
Methods inherited from Lock
constantize, #owner_id, #to_s, #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, execution_plan_id) ⇒ PlanningLock
Returns a new instance of PlanningLock.
316 317 318 319 320 |
# File 'lib/dynflow/coordinator.rb', line 316 def initialize(world, execution_plan_id) super(world) @data.merge!(id: self.class.lock_id(execution_plan_id), execution_plan_id: execution_plan_id) end |
Class Method Details
.lock_id(execution_plan_id) ⇒ Object
322 323 324 |
# File 'lib/dynflow/coordinator.rb', line 322 def self.lock_id(execution_plan_id) 'execution-plan:' + execution_plan_id end |
Instance Method Details
#execution_plan_id ⇒ Object
326 327 328 |
# File 'lib/dynflow/coordinator.rb', line 326 def execution_plan_id @data[:execution_plan_id] end |
#unlock_on_shutdown? ⇒ Boolean
330 331 332 |
# File 'lib/dynflow/coordinator.rb', line 330 def unlock_on_shutdown? false end |