Class: Tarantool::EMDB::OneReplica
- Inherits:
-
Object
- Object
- Tarantool::EMDB::OneReplica
- Includes:
- ParseIProto
- Defined in:
- lib/tarantool/em_db.rb
Constant Summary
Constants included from Util::Packer
Util::Packer::INT16, Util::Packer::INT32, Util::Packer::INT64, Util::Packer::INT8, Util::Packer::MAX_INT16, Util::Packer::MAX_INT32, Util::Packer::MAX_INT64, Util::Packer::MAX_INT8, Util::Packer::MAX_SINT16, Util::Packer::MAX_SINT32, Util::Packer::MAX_SINT64, Util::Packer::MAX_SINT8, Util::Packer::MIN_INT, Util::Packer::MIN_SINT16, Util::Packer::MIN_SINT32, Util::Packer::MIN_SINT64, Util::Packer::MIN_SINT8, Util::Packer::SINT16, Util::Packer::SINT32, Util::Packer::SINT64, Util::Packer::SINT8
Instance Method Summary collapse
- #call(result) ⇒ Object
-
#initialize(response, feed) ⇒ OneReplica
constructor
A new instance of OneReplica.
Methods included from ParseIProto
Constructor Details
#initialize(response, feed) ⇒ OneReplica
Returns a new instance of OneReplica.
76 77 78 79 |
# File 'lib/tarantool/em_db.rb', line 76 def initialize(response, feed) @response = response @feed = feed end |
Instance Method Details
#call(result) ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/tarantool/em_db.rb', line 81 def call(result) if Exception === (result = _parse_iproto(result)) @feed.call result else @feed.call @response.parse_response_for_cb(result) end end |