Make changes for ResourceQuota and friend namespaces.

pull/23182/head
Karthik Ravi Shankar 4 years ago
parent 7166d0124d
commit 133f38a885
  1. 4
      include/grpcpp/impl/codegen/completion_queue_impl.h
  2. 2
      include/grpcpp/server_builder.h
  3. 2
      include/grpcpp/server_impl.h
  4. 2
      src/cpp/server/external_connection_acceptor_impl.cc
  5. 12
      src/cpp/server/server_builder.cc

@ -255,7 +255,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
private:
// Friends for access to server registration lists that enable checking and
// logging on shutdown
friend class ServerBuilder;
friend class ::grpc::ServerBuilder;
friend class ::grpc_impl::Server;
// Friend synchronous wrappers so that they can access Pluck(), which is
@ -445,7 +445,7 @@ class ServerCompletionQueue : public CompletionQueue {
polling_type_(polling_type) {}
grpc_cq_polling_type polling_type_;
friend class ServerBuilder;
friend class ::grpc::ServerBuilder;
friend class ::grpc_impl::Server;
};

@ -225,7 +225,7 @@ class ServerBuilder {
/// Set the attached buffer pool for this server
ServerBuilder& SetResourceQuota(
const grpc_impl::ResourceQuota& resource_quota);
const grpc::ResourceQuota& resource_quota);
ServerBuilder& SetOption(std::unique_ptr<grpc::ServerBuilderOption> option);

@ -222,7 +222,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen {
}
friend class grpc::AsyncGenericService;
friend class ServerBuilder;
friend class grpc::ServerBuilder;
friend class grpc_impl::ServerInitializer;
class SyncRequest;

@ -20,7 +20,7 @@
#include <memory>
#include <grpcpp/server_builder_impl.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/support/channel_arguments.h>
namespace grpc {

@ -68,14 +68,14 @@ ServerBuilder::~ServerBuilder() {
}
}
std::unique_ptr<ServerCompletionQueue> ServerBuilder::AddCompletionQueue(
std::unique_ptr<grpc_impl::ServerCompletionQueue> ServerBuilder::AddCompletionQueue(
bool is_frequently_polled) {
ServerCompletionQueue* cq = new ServerCompletionQueue(
grpc_impl::ServerCompletionQueue* cq = new grpc_impl::ServerCompletionQueue(
GRPC_CQ_NEXT,
is_frequently_polled ? GRPC_CQ_DEFAULT_POLLING : GRPC_CQ_NON_LISTENING,
nullptr);
cqs_.push_back(cq);
return std::unique_ptr<ServerCompletionQueue>(cq);
return std::unique_ptr<grpc_impl::ServerCompletionQueue>(cq);
}
ServerBuilder& ServerBuilder::RegisterService(Service* service) {
@ -289,9 +289,9 @@ std::unique_ptr<grpc::Server> ServerBuilder::BuildAndStart() {
// This is different from the completion queues added to the server via
// ServerBuilder's AddCompletionQueue() method (those completion queues
// are in 'cqs_' member variable of ServerBuilder object)
std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
std::shared_ptr<std::vector<std::unique_ptr<grpc_impl::ServerCompletionQueue>>>
sync_server_cqs(std::make_shared<
std::vector<std::unique_ptr<ServerCompletionQueue>>>());
std::vector<std::unique_ptr<grpc_impl::ServerCompletionQueue>>>());
bool has_frequently_polled_cqs = false;
for (const auto& cq : cqs_) {
@ -320,7 +320,7 @@ std::unique_ptr<grpc::Server> ServerBuilder::BuildAndStart() {
// Create completion queues to listen to incoming rpc requests
for (int i = 0; i < sync_server_settings_.num_cqs; i++) {
sync_server_cqs->emplace_back(
new ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr));
new grpc_impl::ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr));
}
}

Loading…
Cancel
Save