Make resource quota argument optional to the Server constructor

pull/16217/head
Sree Kuchibhotla 7 years ago
parent bdd13cb0ae
commit 9ce673f861
  1. 8
      include/grpcpp/server.h
  2. 4
      src/cpp/server/server_builder.cc
  3. 4
      src/cpp/server/server_cc.cc

@ -120,6 +120,10 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
int AddListeningPort(const grpc::string& addr,
ServerCredentials* creds) override;
/// NOTE: This is *NOT* a public API. The server constructors are supposed to
/// be used by \a ServerBuilder class only. The constructor will be made
/// 'private' very soon.
///
/// Server constructors. To be used by \a ServerBuilder only.
///
/// \param max_message_size Maximum message length that the channel can
@ -144,8 +148,8 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
Server(int max_message_size, ChannelArguments* args,
std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
sync_server_cqs,
grpc_resource_quota* server_rq, int min_pollers, int max_pollers,
int sync_cq_timeout_msec);
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
grpc_resource_quota* server_rq);
/// Start the server.
///

@ -261,9 +261,9 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
}
std::unique_ptr<Server> server(new Server(
max_receive_message_size_, &args, sync_server_cqs, resource_quota_,
max_receive_message_size_, &args, sync_server_cqs,
sync_server_settings_.min_pollers, sync_server_settings_.max_pollers,
sync_server_settings_.cq_timeout_msec));
sync_server_settings_.cq_timeout_msec, resource_quota_));
if (has_sync_methods) {
// This is a Sync server

@ -382,8 +382,8 @@ Server::Server(
int max_receive_message_size, ChannelArguments* args,
std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
sync_server_cqs,
grpc_resource_quota* server_rq, int min_pollers, int max_pollers,
int sync_cq_timeout_msec)
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
grpc_resource_quota* server_rq = nullptr)
: max_receive_message_size_(max_receive_message_size),
sync_server_cqs_(std::move(sync_server_cqs)),
started_(false),

Loading…
Cancel
Save