Module: Concurrent::Actor::InternalDelegations

Includes:
PublicDelegations, Logger::Severity
Included in:
AbstractContext, Behaviour::Abstract
Defined in:
lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb

Instance Method Summary collapse

Methods included from PublicDelegations

#context_class, #executor, #name, #parent, #path, #reference

Instance Method Details

#behaviour(behaviour_class) ⇒ Object

see Core#behaviour



52
53
54
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 52

def behaviour(behaviour_class)
  core.behaviour(behaviour_class)
end

#behaviour!(behaviour_class) ⇒ Object

see Core#behaviour!



57
58
59
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 57

def behaviour!(behaviour_class)
  core.behaviour!(behaviour_class)
end

#childrenObject

See Also:



11
12
13
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 11

def children
  core.children
end

#contextAbstractContext

Returns:



47
48
49
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 47

def context
  core.context
end

#dead_letter_routingObject



37
38
39
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 37

def dead_letter_routing
  context.dead_letter_routing
end

#log(level, message = nil, &block) ⇒ Object

delegates to core.log

See Also:

  • Logging#log


32
33
34
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 32

def log(level, message = nil, &block)
  core.log(level, message, &block)
end

#redirect(reference, envelope = self.envelope) ⇒ Object



41
42
43
44
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 41

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

#terminate!(reason = nil) ⇒ Object

See Also:

  • Termination#terminate!


16
17
18
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 16

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

#terminated?Boolean

Returns:

  • (Boolean)

See Also:

  • Termination#terminated?


21
22
23
# File 'lib/concurrent-ruby-edge/concurrent/actor/internal_delegations.rb', line 21

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