Class: Dynflow::DelayedExecutors::AbstractCore

Inherits:
Actor
  • Object
show all
Includes:
Algebrick::TypeCheck
Defined in:
lib/dynflow/delayed_executors/abstract_core.rb

Direct Known Subclasses

PollingCore

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Actor

#behaviour_definition, #finish_termination, #start_termination, #terminating?

Methods included from MethodicActor

#on_message

Methods included from Actor::LogWithFullBacktrace

#log

Constructor Details

#initialize(world, options = {}) ⇒ AbstractCore

Returns a new instance of AbstractCore.



9
10
11
12
13
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 9

def initialize(world, options = {})
  @world = Type! world, World
  @logger = world.logger
  configure(options)
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



7
8
9
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 7

def logger
  @logger
end

#worldObject (readonly)

Returns the value of attribute world.



7
8
9
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 7

def world
  @world
end

Instance Method Details

#check_delayed_plansObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 23

def check_delayed_plans
  raise NotImplementedError
end

#configure(options) ⇒ Object



19
20
21
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 19

def configure(options)
  @time_source = options.fetch(:time_source, -> { Time.now.utc })
end

#startObject

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/dynflow/delayed_executors/abstract_core.rb', line 15

def start
  raise NotImplementedError
end