Class: InfluxDB::AsyncQueue::Queue
- Inherits:
-
Object
- Object
- InfluxDB::AsyncQueue::Queue
- Defined in:
- lib/influxdb/async_queue/queue.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Instance Method Summary collapse
-
#initialize(adapter) ⇒ Queue
constructor
A new instance of Queue.
- #pop(*args) ⇒ Object
- #push(*args) ⇒ Object
- #write_point(series_name, data) ⇒ Object
- #write_points(data) ⇒ Object
Constructor Details
#initialize(adapter) ⇒ Queue
Returns a new instance of Queue.
7 8 9 |
# File 'lib/influxdb/async_queue/queue.rb', line 7 def initialize(adapter) @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
10 11 12 |
# File 'lib/influxdb/async_queue/queue.rb', line 10 def adapter @adapter end |
Instance Method Details
#pop(*args) ⇒ Object
30 31 32 |
# File 'lib/influxdb/async_queue/queue.rb', line 30 def pop(*args) adapter.pop(*args) end |
#push(*args) ⇒ Object
26 27 28 |
# File 'lib/influxdb/async_queue/queue.rb', line 26 def push(*args) adapter.push(*args) end |
#write_point(series_name, data) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/influxdb/async_queue/queue.rb', line 12 def write_point(series_name, data) push( serialize_point( data.merge(series: series_name) ) ) end |
#write_points(data) ⇒ Object
20 21 22 23 24 |
# File 'lib/influxdb/async_queue/queue.rb', line 20 def write_points(data) push( *data.map { |point| serialize_point(point) } ) end |