class Fluent::ArrayEventStream

EventStream from entries: Array of [time, record]

Use this class for many events data with a tag and its representation is [ [time, record], [time, record], .. ]

Public Class Methods

new(entries) click to toggle source
# File lib/fluent/event.rb, line 120
def initialize(entries)
  @entries = entries
end

Public Instance Methods

dup() click to toggle source
# File lib/fluent/event.rb, line 124
def dup
  entries = @entries.map{ |time, record| [time, record.dup] }
  ArrayEventStream.new(entries)
end
each(unpacker: nil, &block) click to toggle source
# File lib/fluent/event.rb, line 145
def each(unpacker: nil, &block)
  @entries.each(&block)
  nil
end
empty?() click to toggle source
# File lib/fluent/event.rb, line 137
def empty?
  @entries.empty?
end
repeatable?() click to toggle source
# File lib/fluent/event.rb, line 133
def repeatable?
  true
end
size() click to toggle source
# File lib/fluent/event.rb, line 129
def size
  @entries.size
end
slice(index, num) click to toggle source
# File lib/fluent/event.rb, line 141
def slice(index, num)
  ArrayEventStream.new(@entries.slice(index, num))
end