Class: Fluent::LighteningBufferChunk

Inherits:
MemoryBufferChunk
  • Object
show all
Defined in:
lib/fluent/plugin/buf_lightening.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, data = '') ⇒ LighteningBufferChunk

Returns a new instance of LighteningBufferChunk.



8
9
10
11
# File 'lib/fluent/plugin/buf_lightening.rb', line 8

def initialize(key, data='')
  super
  @record_counter = 0
end

Instance Attribute Details

#record_counterObject (readonly)

Returns the value of attribute record_counter.



6
7
8
# File 'lib/fluent/plugin/buf_lightening.rb', line 6

def record_counter
  @record_counter
end

Instance Method Details

#<<(data) ⇒ Object



13
14
15
16
# File 'lib/fluent/plugin/buf_lightening.rb', line 13

def <<(data)
  super
  @record_counter += 1
end