Skip to content

Commit 8e4b737

Browse files
authored
cleanup(bigtable): move refresh into bigtable_internal (#8837)
1 parent 9c1949b commit 8e4b737

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

google/cloud/bigtable/internal/common_client.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ class CommonClient {
6060
google::cloud::internal::DefaultBackgroundThreads(1)),
6161
refresh_cq_(
6262
std::make_shared<CompletionQueue>(background_threads_->cq())),
63-
refresh_state_(std::make_shared<ConnectionRefreshState>(
64-
refresh_cq_, opts_.get<MinConnectionRefreshOption>(),
65-
opts_.get<MaxConnectionRefreshOption>())) {}
63+
refresh_state_(
64+
std::make_shared<bigtable_internal::ConnectionRefreshState>(
65+
refresh_cq_, opts_.get<MinConnectionRefreshOption>(),
66+
opts_.get<MaxConnectionRefreshOption>())) {}
6667

6768
~CommonClient() {
6869
// This will stop the refresh of the channels.
@@ -186,7 +187,7 @@ class CommonClient {
186187
// completion queue in the operations scheduled on it. In order to do it, we
187188
// need to hold one instance by a shared pointer.
188189
std::shared_ptr<CompletionQueue> refresh_cq_;
189-
std::shared_ptr<ConnectionRefreshState> refresh_state_;
190+
std::shared_ptr<bigtable_internal::ConnectionRefreshState> refresh_state_;
190191
};
191192

192193
} // namespace internal

google/cloud/bigtable/internal/connection_refresh_state.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616

1717
namespace google {
1818
namespace cloud {
19-
namespace bigtable {
19+
namespace bigtable_internal {
2020
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
21-
namespace internal {
2221
namespace {
2322

2423
/**
@@ -138,8 +137,7 @@ void OutstandingTimers::CancelAll() {
138137
}
139138
}
140139

141-
} // namespace internal
142140
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
143-
} // namespace bigtable
141+
} // namespace bigtable_internal
144142
} // namespace cloud
145143
} // namespace google

google/cloud/bigtable/internal/connection_refresh_state.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727

2828
namespace google {
2929
namespace cloud {
30-
namespace bigtable {
30+
namespace bigtable_internal {
3131
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
32-
namespace internal {
3332

3433
class OutstandingTimers
3534
: public std::enable_shared_from_this<OutstandingTimers> {
@@ -86,9 +85,8 @@ void ScheduleChannelRefresh(
8685
std::shared_ptr<ConnectionRefreshState> const& state,
8786
std::shared_ptr<grpc::Channel> const& channel);
8887

89-
} // namespace internal
9088
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
91-
} // namespace bigtable
89+
} // namespace bigtable_internal
9290
} // namespace cloud
9391
} // namespace google
9492

google/cloud/bigtable/internal/connection_refresh_state_test.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
namespace google {
1919
namespace cloud {
20-
namespace bigtable {
20+
namespace bigtable_internal {
2121
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
22-
namespace internal {
2322

2423
using TimerFuture = future<StatusOr<std::chrono::system_clock::time_point>>;
2524

@@ -107,8 +106,7 @@ TEST_F(OutstandingTimersTest, TimerRegisteredAfterCancelAllGetCancelled) {
107106
continuation_promise.get_future().get();
108107
}
109108

110-
} // namespace internal
111109
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
112-
} // namespace bigtable
110+
} // namespace bigtable_internal
113111
} // namespace cloud
114112
} // namespace google

0 commit comments

Comments
 (0)