Sha256: 278634873a797cfefb86d920e37fae1a02a1f82ca30882f6396661f455f8df53

Contents?: true

Size: 1.31 KB

Versions: 6

Compression:

Stored size: 1.31 KB

Contents

module Concurrent
  module Actor
    module InternalDelegations
      include PublicDelegations

      # @see Core#children
      def children
        core.children
      end

      # @see Termination#terminate!
      def terminate!(reason = nil)
        behaviour!(Behaviour::Termination).terminate!(reason)
      end

      # @see Termination#terminated?
      def terminated?
        behaviour!(Behaviour::Termination).terminated?
      end

      # # @see Termination#reason
      # def reason
      #   behaviour!(Behaviour::Termination).reason
      # end

      # delegates to core.log
      # @see Logging#log
      def log(level, message = nil, &block)
        core.log(level, message, &block)
      end

      # @see AbstractContext#dead_letter_routing
      def dead_letter_routing
        context.dead_letter_routing
      end

      def redirect(reference, envelope = self.envelope)
        reference.message(envelope.message, envelope.future)
        Behaviour::MESSAGE_PROCESSED
      end

      # @return [AbstractContext]
      def context
        core.context
      end

      # see Core#behaviour
      def behaviour(behaviour_class)
        core.behaviour(behaviour_class)
      end

      # see Core#behaviour!
      def behaviour!(behaviour_class)
        core.behaviour!(behaviour_class)
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
concurrent-ruby-edge-0.2.0.pre4 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.0.pre3 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.0.pre2 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.0.pre1 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.1.1 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.1.0 lib/concurrent/actor/internal_delegations.rb