Module: Concurrent::Actor::InternalDelegations

Includes:
PublicDelegations
Included in:
AbstractContext, Behaviour::Abstract
Defined in:
lib/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



48
49
50
# File 'lib/concurrent/actor/internal_delegations.rb', line 48

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

#behaviour!(behaviour_class) ⇒ Object

see Core#behaviour!



53
54
55
# File 'lib/concurrent/actor/internal_delegations.rb', line 53

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

#childrenObject

See Also:



7
8
9
# File 'lib/concurrent/actor/internal_delegations.rb', line 7

def children
  core.children
end

#contextAbstractContext

Returns:



43
44
45
# File 'lib/concurrent/actor/internal_delegations.rb', line 43

def context
  core.context
end

#dead_letter_routingObject



33
34
35
# File 'lib/concurrent/actor/internal_delegations.rb', line 33

def dead_letter_routing
  context.dead_letter_routing
end

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

delegates to core.log

See Also:

  • Logging#log


28
29
30
# File 'lib/concurrent/actor/internal_delegations.rb', line 28

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

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



37
38
39
40
# File 'lib/concurrent/actor/internal_delegations.rb', line 37

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

#terminate!(reason = nil) ⇒ Object

See Also:

  • Termination#terminate!


12
13
14
# File 'lib/concurrent/actor/internal_delegations.rb', line 12

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

#terminated?Boolean

Returns:

  • (Boolean)

See Also:

  • Termination#terminated?


17
18
19
# File 'lib/concurrent/actor/internal_delegations.rb', line 17

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