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 117 def initialize(entries) @entries = entries end
Public Instance Methods
dup()
click to toggle source
# File lib/fluent/event.rb, line 121 def dup entries = @entries.map{ |time, record| [time, record.dup] } ArrayEventStream.new(entries) end
each(&block)
click to toggle source
# File lib/fluent/event.rb, line 142 def each(&block) @entries.each(&block) nil end
empty?()
click to toggle source
# File lib/fluent/event.rb, line 134 def empty? @entries.empty? end
repeatable?()
click to toggle source
# File lib/fluent/event.rb, line 130 def repeatable? true end
size()
click to toggle source
# File lib/fluent/event.rb, line 126 def size @entries.size end
slice(index, num)
click to toggle source
# File lib/fluent/event.rb, line 138 def slice(index, num) ArrayEventStream.new(@entries.slice(index, num)) end