Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
src
cpp
server
load_reporter
load_reporting_service_server_builder_plugin.cc
Go to the documentation of this file.
1
/*
2
*
3
* Copyright 2018 gRPC authors.
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*/
18
19
#include <
grpc/support/port_platform.h
>
20
21
#include "
src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h
"
22
23
#include <utility>
24
25
#include <
grpcpp/impl/server_initializer.h
>
26
#include <
grpcpp/server_builder.h
>
27
28
namespace
grpc
{
29
namespace
load_reporter {
30
31
bool
LoadReportingServiceServerBuilderPlugin::has_sync_methods
()
const
{
32
if
(
service_
!=
nullptr
) {
33
return
service_
->has_synchronous_methods();
34
}
35
return
false
;
36
}
37
38
bool
LoadReportingServiceServerBuilderPlugin::has_async_methods
()
const
{
39
if
(
service_
!=
nullptr
) {
40
return
service_
->has_async_methods();
41
}
42
return
false
;
43
}
44
45
void
LoadReportingServiceServerBuilderPlugin::UpdateServerBuilder
(
46
grpc::ServerBuilder
*
builder
) {
47
auto
cq
=
builder
->AddCompletionQueue();
48
service_
= std::make_shared<LoadReporterAsyncServiceImpl>(
std::move
(
cq
));
49
}
50
51
void
LoadReportingServiceServerBuilderPlugin::InitServer
(
52
grpc::ServerInitializer
* si) {
53
si->
RegisterService
(
service_
);
54
}
55
56
void
LoadReportingServiceServerBuilderPlugin::Finish
(
57
grpc::ServerInitializer
*
/*si*/
) {
58
service_
->StartThread();
59
service_
.reset();
60
}
61
62
}
// namespace load_reporter
63
}
// namespace grpc
server_initializer.h
grpc
Definition:
grpcpp/alarm.h:33
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::has_sync_methods
bool has_sync_methods() const override
Definition:
load_reporting_service_server_builder_plugin.cc:31
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::Finish
void Finish(ServerInitializer *si) override
Finish will be called at the end of ServerBuilder::BuildAndStart().
Definition:
load_reporting_service_server_builder_plugin.cc:56
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::UpdateServerBuilder
void UpdateServerBuilder(ServerBuilder *builder) override
Definition:
load_reporting_service_server_builder_plugin.cc:45
profile_analyzer.builder
builder
Definition:
profile_analyzer.py:159
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::service_
std::shared_ptr< LoadReporterAsyncServiceImpl > service_
Definition:
load_reporting_service_server_builder_plugin.h:60
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition:
abseil-cpp/absl/utility/utility.h:221
grpc::ServerBuilder
A builder class for the creation and startup of grpc::Server instances.
Definition:
grpcpp/server_builder.h:86
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::InitServer
void InitServer(ServerInitializer *si) override
Definition:
load_reporting_service_server_builder_plugin.cc:51
load_reporting_service_server_builder_plugin.h
grpc::load_reporter::LoadReportingServiceServerBuilderPlugin::has_async_methods
bool has_async_methods() const override
Definition:
load_reporting_service_server_builder_plugin.cc:38
grpc::ServerInitializer::RegisterService
bool RegisterService(std::shared_ptr< grpc::Service > service)
Definition:
grpcpp/impl/server_initializer.h:35
grpc::ServerInitializer
Definition:
grpcpp/impl/server_initializer.h:31
server_builder.h
cq
static grpc_completion_queue * cq
Definition:
test/core/fling/client.cc:37
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:29