Method: Fluent::Plugin::Buffer#initialize

Defined in:
lib/fluent/plugin/buffer.rb

#initializeBuffer

Returns a new instance of Buffer.



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/fluent/plugin/buffer.rb', line 172

def initialize
  super

  @chunk_limit_size = nil
  @total_limit_size = nil
  @queue_limit_length = nil
  @chunk_limit_records = nil

  @stage = {}    #=> Hash (metadata -> chunk) : not flushed yet
  @queue = []    #=> Array (chunks)           : already flushed (not written)
  @dequeued = {} #=> Hash (unique_id -> chunk): already written (not purged)
  @queued_num = {} # metadata => int (number of queued chunks)
  @dequeued_num = {} # metadata => int (number of dequeued chunks)

  @stage_length_metrics = nil
  @stage_size_metrics = nil
  @queue_length_metrics = nil
  @queue_size_metrics = nil
  @available_buffer_space_ratios_metrics = nil
  @total_queued_size_metrics = nil
  @newest_timekey_metrics = nil
  @oldest_timekey_metrics = nil
  @timekeys = Hash.new(0)
  @enable_update_timekeys = false
  @mutex = Mutex.new
end