class Dynflow::ThrottleLimiter
Attributes
core[R]
Public Class Methods
new(world)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 6 def initialize(world) @world = world spawn end
Public Instance Methods
cancel!(plan_id)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 23 def cancel!(plan_id) core.tell([:cancel, plan_id]) end
core_class()
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 35 def core_class Core end
finish(plan_id)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 15 def finish(plan_id) core.tell([:finish, plan_id]) end
handle_plans!(*args)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 19 def handle_plans!(*args) core.ask!([:handle_plans, *args]) end
initialize_plan(plan_id, semaphores_hash)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 11 def initialize_plan(plan_id, semaphores_hash) core.tell([:initialize_plan, plan_id, semaphores_hash]) end
observe(parent_id = nil)
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 31 def observe(parent_id = nil) core.ask!([:observe, parent_id]) end
terminate()
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 27 def terminate core.ask(:terminate!) end
Private Instance Methods
spawn()
click to toggle source
# File lib/dynflow/throttle_limiter.rb, line 41 def spawn Concurrent.future.tap do |initialized| @core = core_class.spawn(:name => 'throttle-limiter', :args => [@world], :initialized => initialized) end end