class OfflineSort::Chunk::InputOutput::MessagePack

Attributes

packer[R]
unpacker[R]

Public Class Methods

new(io) click to toggle source
# File lib/offline_sort/chunk/input_output/message_pack.rb, line 12
def initialize(io)
  super
  @packer = ::MessagePack::Packer.new(io)
  @unpacker = ::MessagePack::Unpacker.new(io)
end

Public Instance Methods

flush() click to toggle source
# File lib/offline_sort/chunk/input_output/message_pack.rb, line 26
def flush
  packer.flush
  super
end
read_entry() click to toggle source
# File lib/offline_sort/chunk/input_output/message_pack.rb, line 18
def read_entry
  unpacker.read
end
write_entry(entry) click to toggle source
# File lib/offline_sort/chunk/input_output/message_pack.rb, line 22
def write_entry(entry)
  packer.write(entry)
end