folly::Future<std::pair<int32_t, std::unique_ptr<apache::thrift::transport::THeader>>> service2AsyncClient::header_future_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const ::test_cpp2::cpp_reflection::struct1& j, double k) { folly::Promise<std::pair<int32_t, std::unique_ptr<apache::thrift::transport::THeader>>> promise172; auto future173 = promise172.getFuture(); auto callback174 = folly::make_unique<apache::thrift::HeaderFutureCallback<int32_t>>(std::move(promise172), recv_wrapped_methodD, channel_); methodD(rpcOptions, std::move(callback174), i, j, k); return future173; }
folly::Future<int32_t> service2AsyncClient::future_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const ::test_cpp2::cpp_reflection::struct1& j, double k) { folly::Promise<int32_t> promise169; auto future170 = promise169.getFuture(); auto callback171 = folly::make_unique<apache::thrift::FutureCallback<int32_t>>(std::move(promise169), recv_wrapped_methodD, channel_); methodD(rpcOptions, std::move(callback171), i, j, k); return future170; }
int32_t service2AsyncClient::sync_methodD(apache::thrift::RpcOptions& rpcOptions, int32_t i, const ::test_cpp2::cpp_reflection::struct1& j, double k) { apache::thrift::ClientReceiveState _returnState; auto callback168 = folly::make_unique<apache::thrift::ClientSyncCallback>(&_returnState, getChannel()->getEventBase(), false); methodD(rpcOptions, std::move(callback168), i, j, k); getChannel()->getEventBase()->loopForever(); SCOPE_EXIT { if (_returnState.header() && !_returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(_returnState.header()->releaseHeaders()); } }; if (!_returnState.buf()) { assert(_returnState.exception()); std::rethrow_exception(_returnState.exception()); } return recv_methodD(_returnState); }
folly::Future<int32_t> service2SvIf::future_methodD(int32_t i, std::unique_ptr< ::test_cpp2::cpp_reflection::struct1> j, double k) { return apache::thrift::detail::si::future([&] { return methodD(i, std::move(j), k); }); }
void service2AsyncClient::methodD(std::function<void (::apache::thrift::ClientReceiveState&&)> callback, int32_t i, const ::test_cpp2::cpp_reflection::struct1& j, double k) { methodD(folly::make_unique<apache::thrift::FunctionReplyCallback>(std::move(callback)),i,j,k); }
void service2AsyncClient::methodD(std::unique_ptr<apache::thrift::RequestCallback> callback, int32_t i, const ::test_cpp2::cpp_reflection::struct1& j, double k) { ::apache::thrift::RpcOptions rpcOptions; methodD(rpcOptions, std::move(callback), i, j, k); }