class StatelyDB::Transaction::Transaction

def request_response(req)

Other tags:
    Api: - private

Returns:
  • (::Stately::Db::TransactionResponse) - the response

Parameters:
  • req (::Stately::Db::TransactionRequest) -- the request to send
def request_response(req)
  request_only(req)
  begin
    resp = @incoming_responses.next
    if req.message_id != resp.message_id
      raise "Message ID mismatch: request #{req.message_id} != response #{resp.message_id}"
    end
    raise "Response type mismatch" if infer_response_type_from_request(req) != infer_response_type_from_response(resp)
    resp
  rescue StopIteration
    nil
  end
end