Class: Fluent::CompressedMessagePackEventStream
Instance Method Summary
collapse
#dup, #repeatable?, #size, #slice
Methods inherited from EventStream
#==, #dup, #repeatable?, #size, #slice, #to_msgpack_stream_forced_integer
#compress, #decompress
Constructor Details
#initialize(data, cached_unpacker = nil, size = 0, unpacked_times: nil, unpacked_records: nil) ⇒ CompressedMessagePackEventStream
Returns a new instance of CompressedMessagePackEventStream.
271
272
273
274
275
|
# File 'lib/fluent/event.rb', line 271
def initialize(data, cached_unpacker = nil, size = 0, unpacked_times: nil, unpacked_records: nil)
super
@decompressed_data = nil
@compressed_data = data
end
|
Instance Method Details
#each(unpacker: nil, &block) ⇒ Object
287
288
289
290
|
# File 'lib/fluent/event.rb', line 287
def each(unpacker: nil, &block)
ensure_decompressed!
super
end
|
#empty? ⇒ Boolean
277
278
279
280
|
# File 'lib/fluent/event.rb', line 277
def empty?
ensure_decompressed!
super
end
|
#ensure_unpacked!(unpacker: nil) ⇒ Object
282
283
284
285
|
# File 'lib/fluent/event.rb', line 282
def ensure_unpacked!(unpacker: nil)
ensure_decompressed!
super
end
|
#to_compressed_msgpack_stream(time_int: false, packer: nil) ⇒ Object
297
298
299
300
|
# File 'lib/fluent/event.rb', line 297
def to_compressed_msgpack_stream(time_int: false, packer: nil)
@compressed_data
end
|
#to_msgpack_stream(time_int: false, packer: nil) ⇒ Object
292
293
294
295
|
# File 'lib/fluent/event.rb', line 292
def to_msgpack_stream(time_int: false, packer: nil)
ensure_decompressed!
super
end
|