class LogStash::Outputs::LogstashAzureBlobOutput::SizeAndTimeRotationPolicy

a sub class of LogstashAzureBlobOutput sets the rotation policy

Public Class Methods

new(file_size, time_file) click to toggle source

initialize the class

# File lib/logstash/outputs/blob/size_and_time_rotation_policy.rb, line 11
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

boolean method

# File lib/logstash/outputs/blob/size_and_time_rotation_policy.rb, line 22
def needs_periodic?
  true
end
rotate?(file) click to toggle source

check if it is time to rotate

# File lib/logstash/outputs/blob/size_and_time_rotation_policy.rb, line 17
def rotate?(file)
  @size_strategy.rotate?(file) || @time_strategy.rotate?(file)
end