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.



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

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

Instance Attribute Details

#record_counter ⇒ Object (readonly)

Returns the value of attribute record_counter.



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

def record_counter
  @record_counter
end

Instance Method Details

#<<(data) ⇒ Object



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

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