class Fluent::PullBufferChunk

Attributes

flushed[RW]

Public Class Methods

new(key, path, unique_id, mode="a+", symlink_path = nil) click to toggle source
Calls superclass method
# File lib/fluent/plugin/buf_pullpool.rb, line 7
def initialize(key, path, unique_id, mode="a+", symlink_path = nil)
  super
  @flushed = false
end

Public Instance Methods

actual_purge() click to toggle source
# File lib/fluent/plugin/buf_pullpool.rb, line 19
def actual_purge
  @file.close
  File.unlink(@path) rescue nil # TODO: check @path exists or not, and remove-or-rename if exists
end
purge() click to toggle source
# File lib/fluent/plugin/buf_pullpool.rb, line 12
def purge
  # do not anything if not flushed yet: call actual_purge explicitly.
  if @flushed
    actual_purge
  end
end