Module: Mongo::Protocol::Serializers::Int64 Private
- Defined in:
- lib/mongo/protocol/serializers.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
MongoDB wire protocol serialization strategy for 64-bit integers.
Serializes and de-serializes one 64-bit integer.
Class Method Summary collapse
-
.deserialize(buffer) ⇒ Fixnum
private
Deserializes a 64-bit Fixnum from the IO stream.
-
.serialize(buffer, value) ⇒ String
private
Serializes a fixnum to an 8-byte 64-bit integer.
Class Method Details
.deserialize(buffer) ⇒ Fixnum
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deserializes a 64-bit Fixnum from the IO stream
145 146 147 |
# File 'lib/mongo/protocol/serializers.rb', line 145 def self.deserialize(buffer) buffer.get_int64 end |
.serialize(buffer, value) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Serializes a fixnum to an 8-byte 64-bit integer
136 137 138 |
# File 'lib/mongo/protocol/serializers.rb', line 136 def self.serialize(buffer, value) buffer.put_int64(value) end |