Class: Fluent::CompressedMessagePackEventStream
Constant Summary
Plugin::Compressable::DEFAULT_DECOMPRESSION_SIZE_LIMIT
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, compress: :gzip, decompression_size_limit: Fluent::Plugin::Compressable::DEFAULT_DECOMPRESSION_SIZE_LIMIT) ⇒ CompressedMessagePackEventStream
Returns a new instance of CompressedMessagePackEventStream.
271
272
273
274
275
276
277
|
# File 'lib/fluent/event.rb', line 271
def initialize(data, cached_unpacker = nil, size = 0, unpacked_times: nil, unpacked_records: nil, compress: :gzip, decompression_size_limit: Fluent::Plugin::Compressable::DEFAULT_DECOMPRESSION_SIZE_LIMIT)
super(data, cached_unpacker, size, unpacked_times: unpacked_times, unpacked_records: unpacked_records)
@decompressed_data = nil
@compressed_data = data
@type = compress
@decompression_size_limit = decompression_size_limit
end
|
Instance Method Details
#each(unpacker: nil, &block) ⇒ Object
289
290
291
292
|
# File 'lib/fluent/event.rb', line 289
def each(unpacker: nil, &block)
ensure_decompressed!
super
end
|
#empty? ⇒ Boolean
279
280
281
282
|
# File 'lib/fluent/event.rb', line 279
def empty?
ensure_decompressed!
super
end
|
#ensure_unpacked!(unpacker: nil) ⇒ Object
284
285
286
287
|
# File 'lib/fluent/event.rb', line 284
def ensure_unpacked!(unpacker: nil)
ensure_decompressed!
super
end
|
#to_compressed_msgpack_stream(time_int: false, packer: nil) ⇒ Object
299
300
301
302
|
# File 'lib/fluent/event.rb', line 299
def to_compressed_msgpack_stream(time_int: false, packer: nil)
@compressed_data
end
|
#to_msgpack_stream(time_int: false, packer: nil) ⇒ Object
294
295
296
297
|
# File 'lib/fluent/event.rb', line 294
def to_msgpack_stream(time_int: false, packer: nil)
ensure_decompressed!
super
end
|