Module: Camayoc
- Defined in:
- lib/camayoc/handlers/statsd.rb,
lib/camayoc.rb,
lib/camayoc/stats.rb,
lib/camayoc/timer.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
Defined Under Namespace
Modules: Handlers, ThreadSafety
Classes: StatEvent, Stats, Timer
Constant Summary
collapse
- DELIMITER =
":"
- VERSION =
"0.2.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
|
.all ⇒ Object
29
30
31
|
# File 'lib/camayoc.rb', line 29
def all
@lock.synchronize { @registry.values.dup }
end
|
.join(*names) ⇒ Object
41
42
43
|
# File 'lib/camayoc.rb', line 41
def join(*names)
names.flatten.join(DELIMITER)
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
37
38
39
|
# File 'lib/camayoc.rb', line 37
def thread_safe?
@thread_safe == true
end
|