class LogStash::Outputs::Swift::SizeAndTimeRotationPolicy

Public Class Methods

new(file_size, time_file) click to toggle source
# File lib/logstash/outputs/swift/size_and_time_rotation_policy.rb, line 9
def initialize(file_size, time_file)
  @size_strategy = SizeRotationPolicy.new(file_size)
  @time_strategy = TimeRotationPolicy.new(time_file)
end

Public Instance Methods

needs_periodic?() click to toggle source
# File lib/logstash/outputs/swift/size_and_time_rotation_policy.rb, line 18
def needs_periodic?
  true
end
rotate?(file) click to toggle source
# File lib/logstash/outputs/swift/size_and_time_rotation_policy.rb, line 14
def rotate?(file)
  @size_strategy.rotate?(file) || @time_strategy.rotate?(file)
end