class Fluent::MemoryBuffer
Public Class Methods
new()
click to toggle source
Calls superclass method
Fluent::BasicBuffer.new
# File lib/fluent/plugin/buf_memory.rb, line 69 def initialize super end
Public Instance Methods
before_shutdown(out)
click to toggle source
# File lib/fluent/plugin/buf_memory.rb, line 87 def before_shutdown(out) if @flush_at_shutdown synchronize do @map.each_key {|key| push(key) } while pop(out) end end end end
configure(conf)
click to toggle source
Calls superclass method
Fluent::BasicBuffer#configure
# File lib/fluent/plugin/buf_memory.rb, line 78 def configure(conf) super unless @flush_at_shutdown $log.warn "When flush_at_shutdown is false, buf_memory discards buffered chunks at shutdown." $log.warn "Please confirm 'flush_at_shutdown false' configuration is correct or not." end end
enqueue(chunk)
click to toggle source
# File lib/fluent/plugin/buf_memory.rb, line 107 def enqueue(chunk) end
new_chunk(key)
click to toggle source
# File lib/fluent/plugin/buf_memory.rb, line 99 def new_chunk(key) MemoryBufferChunk.new(key) end
resume()
click to toggle source
# File lib/fluent/plugin/buf_memory.rb, line 103 def resume return [], {} end