Sha256: d5ab63e33d4eed329c1a6f626042531c2b11f4e1c8f8f42f8b86ab5d64f52490

Contents?: true

Size: 1.02 KB

Versions: 18

Compression:

Stored size: 1.02 KB

Contents

module Dynflow
  module Executors
    class Abstract
      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

      include Algebrick::TypeCheck
      attr_reader :world, :logger

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

      # @return [Future]
      # @raise when execution_plan_id is not accepted
      def execute(execution_plan_id)
        raise NotImplementedError
      end

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

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

      # @return [Future]
      def initialized
        raise NotImplementedError
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dynflow-0.7.9 lib/dynflow/executors/abstract.rb
dynflow-0.7.8 lib/dynflow/executors/abstract.rb
dynflow-0.7.7 lib/dynflow/executors/abstract.rb
dynflow-0.7.6 lib/dynflow/executors/abstract.rb
dynflow-0.7.5 lib/dynflow/executors/abstract.rb
dynflow-0.7.4 lib/dynflow/executors/abstract.rb
dynflow-0.7.3 lib/dynflow/executors/abstract.rb
dynflow-0.7.2 lib/dynflow/executors/abstract.rb
dynflow-0.7.1 lib/dynflow/executors/abstract.rb
dynflow-0.7.0 lib/dynflow/executors/abstract.rb
dynflow-0.6.2 lib/dynflow/executors/abstract.rb
dynflow-0.6.1 lib/dynflow/executors/abstract.rb
dynflow-0.6.0 lib/dynflow/executors/abstract.rb
dynflow-0.5.1 lib/dynflow/executors/abstract.rb
dynflow-0.5.0 lib/dynflow/executors/abstract.rb
dynflow-0.4.1 lib/dynflow/executors/abstract.rb
dynflow-0.4.0 lib/dynflow/executors/abstract.rb
dynflow-0.3.0 lib/dynflow/executors/abstract.rb