Sha256: a59b9c551ce2fc3374b0096038851d3df489ae0da635a1b709e56b65cf587b93

Contents?: true

Size: 1.34 KB

Versions: 16

Compression:

Stored size: 1.34 KB

Contents

module Concurrent
  module Actor
    module InternalDelegations
      include PublicDelegations
      include Logger::Severity

      # @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

16 entries across 16 versions & 1 rubygems

Version Path
concurrent-ruby-edge-0.6.0 lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.6.0.pre1 lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.5.0 lib-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.4.1 lib-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.4.0.pre2 lib-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.4.0.pre1 lib-edge/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.4 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.3.1 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.3.0 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.3 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.3.pre3 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.2 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.1 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.0 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.2.0.pre5 lib/concurrent/actor/internal_delegations.rb
concurrent-ruby-edge-0.1.2 lib/concurrent/actor/internal_delegations.rb