Module: Concurrent::Actor::InternalDelegations

Includes:
PublicDelegations, Logger::Severity
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



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

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

#behaviour!(behaviour_class) ⇒ Object

see Core#behaviour!



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

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

#childrenObject

See Also:



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

def children
  core.children
end

#contextAbstractContext

Returns:



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

def context
  core.context
end

#dead_letter_routingObject



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

def dead_letter_routing
  context.dead_letter_routing
end

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

delegates to core.log

See Also:

  • Logging#log


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

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

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



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

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

#terminate!(reason = nil) ⇒ Object

See Also:

  • Termination#terminate!


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

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

#terminated?Boolean

Returns:

  • (Boolean)

See Also:

  • Termination#terminated?


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

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