Class: Dynflow::Executors::Abstract

Inherits:
Object
  • Object
show all
Includes:
Algebrick::TypeCheck
Defined in:
lib/dynflow/executors/abstract.rb

Direct Known Subclasses

Parallel, RemoteViaSocket

Constant Summary collapse

Event =
Algebrick.type do
  fields! execution_plan_id: String,
          step_id:           Fixnum,
          event:             Object,
          result:            Future
end
Execution =
Algebrick.type do
  fields! execution_plan_id: String,
          finished:          Future
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(world) ⇒ Abstract

Returns a new instance of Abstract.



19
20
21
22
# File 'lib/dynflow/executors/abstract.rb', line 19

def initialize(world)
  @world  = Type! world, World
  @logger = world.logger
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



17
18
19
# File 'lib/dynflow/executors/abstract.rb', line 17

def logger
  @logger
end

#worldObject (readonly)

Returns the value of attribute world.



17
18
19
# File 'lib/dynflow/executors/abstract.rb', line 17

def world
  @world
end

Instance Method Details

#event(execution_plan_id, step_id, event, future = Future) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/dynflow/executors/abstract.rb', line 30

def event(execution_plan_id, step_id, event, future = Future)
  raise NotImplementedError
end

#execute(execution_plan_id) ⇒ Future

Returns:

Raises:

  • when execution_plan_id is not accepted



26
27
28
# File 'lib/dynflow/executors/abstract.rb', line 26

def execute(execution_plan_id)
  raise NotImplementedError
end

#initializedFuture

Returns:

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/dynflow/executors/abstract.rb', line 39

def initialized
  raise NotImplementedError
end

#terminate(future = Future.new) ⇒ Object

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/dynflow/executors/abstract.rb', line 34

def terminate(future = Future.new)
  raise NotImplementedError
end