health_check_service_ = std::move(service);
}
+ ContextAllocator* context_allocator() { return context_allocator_.get(); }
+
/// NOTE: This method is not part of the public API for this class.
bool health_check_service_disabled() const {
return health_check_service_disabled_;
/// ownership of theservice. The service must exist for the lifetime of the
/// Server instance.
void RegisterCallbackGenericService(CallbackGenericService* service) override;
+
+ void RegisterContextAllocator(
+ std::unique_ptr<ContextAllocator> context_allocator) {
+ context_allocator_ = std::move(context_allocator);
+ }
+
#else
/// NOTE: class experimental_registration_type is not part of the public API
/// of this class
server_->RegisterCallbackGenericService(service);
}
+ void RegisterContextAllocator(
+ std::unique_ptr<ContextAllocator> context_allocator) override {
+ server_->context_allocator_ = std::move(context_allocator);
+ }
+
private:
Server* server_;
};
std::unique_ptr<ServerInitializer> server_initializer_;
+ std::unique_ptr<ContextAllocator> context_allocator_;
+
std::unique_ptr<HealthCheckServiceInterface> health_check_service_;
bool health_check_service_disabled_;