Class: Fluent::EventLimitedBufferChunk

Inherits:
FileBufferChunk
  • Object
show all
Defined in:
lib/fluent/plugin/buf_event_limited.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, path, unique_id, separator, mode = "a+", symlink_path = nil) ⇒ EventLimitedBufferChunk



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

def initialize(key, path, unique_id, separator, mode = "a+", symlink_path = nil)
  super(key, path, unique_id, mode = "a+", symlink_path = nil)
  init_counter(path, separator)
end

Instance Attribute Details

#record_counterObject (readonly)

Returns the value of attribute record_counter.



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

def record_counter
  @record_counter
end

Instance Method Details

#<<(data) ⇒ Object



12
13
14
15
16
17
# File 'lib/fluent/plugin/buf_event_limited.rb', line 12

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

  return result
end