class Fluent::Plugin::TailInput::FilePositionEntry
pos inode fffffffffffffffftffffffffffffffffn
Constants
- INO_OFFSET
- INO_SIZE
- LN_OFFSET
- POS_SIZE
- SIZE
Attributes
seek[W]
Public Class Methods
new(file, file_mutex, seek, pos, inode)
click to toggle source
# File lib/fluent/plugin/in_tail/position_file.rb, line 207 def initialize(file, file_mutex, seek, pos, inode) @file = file @file_mutex = file_mutex @seek = seek @pos = pos @inode = inode end
Public Instance Methods
read_inode()
click to toggle source
# File lib/fluent/plugin/in_tail/position_file.rb, line 234 def read_inode @inode end
read_pos()
click to toggle source
# File lib/fluent/plugin/in_tail/position_file.rb, line 238 def read_pos @pos end
update(ino, pos)
click to toggle source
# File lib/fluent/plugin/in_tail/position_file.rb, line 217 def update(ino, pos) @file_mutex.synchronize { @file.pos = @seek @file.write "%016x\t%016x" % [pos, ino] } @pos = pos @inode = ino end
update_pos(pos)
click to toggle source
# File lib/fluent/plugin/in_tail/position_file.rb, line 226 def update_pos(pos) @file_mutex.synchronize { @file.pos = @seek @file.write "%016x" % pos } @pos = pos end