Module: Camayoc

Defined in:
lib/camayoc/handlers/statsd.rb,
lib/camayoc.rb,
lib/camayoc/stats.rb,
lib/camayoc/version.rb,
lib/camayoc/stat_event.rb,
lib/camayoc/handlers/io.rb,
lib/camayoc/thread_safety.rb,
lib/camayoc/handlers/redis.rb,
lib/camayoc/handlers/filter.rb,
lib/camayoc/handlers/logger.rb,
lib/camayoc/handlers/memory.rb,
lib/camayoc/handlers/timing.rb

Overview

This class is a port of the code in github.com/reinh/statsd to fit with the Camayoc handler interface.

Defined Under Namespace

Modules: Handlers, ThreadSafety Classes: StatEvent, Stats

Constant Summary collapse

DELIMITER =
":"
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



21
22
23
# File 'lib/camayoc.rb', line 21

def [](name)
  @lock.synchronize { @registry[name] ||= _new(name) }  
end

.allObject



29
30
31
# File 'lib/camayoc.rb', line 29

def all
  @lock.synchronize { @registry.values.dup }
end

.new(name) ⇒ Object



25
26
27
# File 'lib/camayoc.rb', line 25

def new(name)
  @lock.synchronize { _new(name) }
end

.thread_safe=(value) ⇒ Object



33
34
35
# File 'lib/camayoc.rb', line 33

def thread_safe=(value)
  @thread_safe = value
end

.thread_safe?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/camayoc.rb', line 37

def thread_safe?
  @thread_safe == true
end