Class: StatsD::Instrument::BatchedUDPSink::Buffer

Inherits:
SizedQueue
  • Object
show all
Defined in:
lib/statsd/instrument/batched_udp_sink.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



65
66
67
# File 'lib/statsd/instrument/batched_udp_sink.rb', line 65

def inspect
  "<#{self.class.name}:#{object_id} capacity=#{max} size=#{size}>"
end

#pop_nonblockObject



69
70
71
72
73
# File 'lib/statsd/instrument/batched_udp_sink.rb', line 69

def pop_nonblock
  pop(true)
rescue ThreadError
  nil
end

#push_nonblock(item) ⇒ Object



59
60
61
62
63
# File 'lib/statsd/instrument/batched_udp_sink.rb', line 59

def push_nonblock(item)
  push(item, true)
rescue ThreadError, ClosedQueueError
  nil
end