Class: Celluloid::Probe

### Home Classes Methods

### In Files

- lib/celluloid/probe.rb

### Parent

Object

### Methods

- ::actor_created
- ::actor_died
- ::actor_named
- ::actors_linked
- ::new
- ::run
- ::run_without_supervision
- #dispatch_event
- #process_queue

### Included Modules

- Celluloid
- Celluloid::Notifications

### Class/Module Index

Quicksearch

- Celluloid
- Celluloid::Incident
- Celluloid::IncidentLogger
- Celluloid::IncidentLogger::Severity
- Celluloid::IncidentReporter
- Celluloid::IncidentReporter::Formatter
- Celluloid::Internals
- Celluloid::Internals::CPUCounter
- Celluloid::Internals::CallChain
- Celluloid::Internals::Handler
- Celluloid::Internals::Handlers
- Celluloid::Internals::Links
- Celluloid::Internals::Logger
- Celluloid::Internals::Logger::WithBacktrace
- Celluloid::Internals::Method
- Celluloid::Internals::Properties
- Celluloid::Internals::Receiver
- Celluloid::Internals::Receivers
- Celluloid::Internals::Registry
- Celluloid::Internals::Response
- Celluloid::Internals::Response::Block
- Celluloid::Internals::Response::Error
- Celluloid::Internals::Response::Success
- Celluloid::Internals::Signals
- Celluloid::Internals::Stack
- Celluloid::Internals::Stack::ActorState
- Celluloid::Internals::Stack::CellState
- Celluloid::Internals::Stack::DisplayBacktrace
- Celluloid::Internals::Stack::Dump
- Celluloid::Internals::Stack::Summary
- Celluloid::Internals::Stack::TaskState
- Celluloid::Internals::Stack::ThreadState
- Celluloid::Internals::TaskSet
- Celluloid::Internals::ThreadHandle
- Celluloid::Internals::UUID
- Celluloid::LogEvent
- Celluloid::Notifications
- Celluloid::Notifications::Fanout
- Celluloid::Notifications::Subscriber
- Celluloid::Probe
- Celluloid::RingBuffer

No matching classes.

# Celluloid::Probe

### Constants

EVENTS_BUFFER
NOTIFICATIONS_TOPIC_BASE

### Public Class Methods

actor_created(actor) click to toggle source

    # File lib/celluloid/probe.rb, line 23
    def actor_created(actor)
      trigger_event(:actor_created, actor)
    end

actor_died(actor) click to toggle source

    # File lib/celluloid/probe.rb, line 31
    def actor_died(actor)
      trigger_event(:actor_died, actor)
    end

actor_named(actor) click to toggle source

    # File lib/celluloid/probe.rb, line 27
    def actor_named(actor)
      trigger_event(:actor_named, actor)
    end

actors_linked(a, b) click to toggle source

    # File lib/celluloid/probe.rb, line 35
    def actors_linked(a, b)
      a = find_actor(a)
      b = find_actor(b)
      trigger_event(:actors_linked, a, b)
    end

new() click to toggle source

    # File lib/celluloid/probe.rb, line 60
    def initialize
      async.process_queue
    end

run() click to toggle source

    # File lib/celluloid/probe.rb, line 14
    def run
      # spawn the actor if not found
      supervise_as(:probe_actor) unless Actor[:probe_actor] && Actor[:probe_actor].alive?
    end

run_without_supervision() click to toggle source

    # File lib/celluloid/probe.rb, line 19
    def run_without_supervision
      Actor[:probe_actor] = Celluloid::Probe.new
    end

### Public Instance Methods

dispatch_event(cmd, args) click to toggle source

    # File lib/celluloid/probe.rb, line 71
    def dispatch_event(cmd, args)
      publish(NOTIFICATIONS_TOPIC_BASE % cmd, args)
    end

process_queue() click to toggle source

    # File lib/celluloid/probe.rb, line 64
    def process_queue
      until EVENTS_BUFFER.empty?
        event = EVENTS_BUFFER.pop
        dispatch_event(*event)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.