Class: Fluent::EventLimitedBufferChunk
- Inherits:
-
FileBufferChunk
- Object
- FileBufferChunk
- Fluent::EventLimitedBufferChunk
- Defined in:
- lib/fluent/plugin/buf_event_limited.rb
Instance Attribute Summary collapse
-
#record_counter ⇒ Object
readonly
Returns the value of attribute record_counter.
Instance Method Summary collapse
- #<<(data) ⇒ Object
-
#initialize(key, path, unique_id, separator, mode = "a+", symlink_path = nil) ⇒ EventLimitedBufferChunk
constructor
A new instance of EventLimitedBufferChunk.
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_counter ⇒ Object (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 |