aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/grpc/client/grpc_client_low.h
diff options
context:
space:
mode:
authorayasu <ayasu@yandex-team.ru>2022-02-10 16:50:18 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:18 +0300
commita1b790e06e8e99cffd5157a991259f9d0f993f66 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/grpc/client/grpc_client_low.h
parent9f1131cecd3c7aacc2f7f803e8820eccbfcea203 (diff)
downloadydb-a1b790e06e8e99cffd5157a991259f9d0f993f66.tar.gz
Restoring authorship annotation for <ayasu@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/grpc/client/grpc_client_low.h')
-rw-r--r--library/cpp/grpc/client/grpc_client_low.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/grpc/client/grpc_client_low.h b/library/cpp/grpc/client/grpc_client_low.h
index 07bf1dd1e0..ab0a0627be 100644
--- a/library/cpp/grpc/client/grpc_client_low.h
+++ b/library/cpp/grpc/client/grpc_client_low.h
@@ -486,16 +486,16 @@ public:
}
}
}
-
- const TInstant& GetLastUseTime() const {
- return LastUsed_;
- }
-
- void SetLastUseTime(const TInstant& time) {
- LastUsed_ = time;
- }
+
+ const TInstant& GetLastUseTime() const {
+ return LastUsed_;
+ }
+
+ void SetLastUseTime(const TInstant& time) {
+ LastUsed_ = time;
+ }
private:
- TInstant LastUsed_ = Now();
+ TInstant LastUsed_ = Now();
std::shared_mutex RWMutex_;
std::unordered_map<TypeInfoRef, std::shared_ptr<void>, THasher, TEqualTo> Stubs_;
std::shared_ptr<grpc::ChannelInterface> ChannelInterface_;
@@ -503,20 +503,20 @@ private:
class TChannelPool {
public:
- TChannelPool(const TTcpKeepAliveSettings& tcpKeepAliveSettings, const TDuration& expireTime = TDuration::Minutes(6));
+ TChannelPool(const TTcpKeepAliveSettings& tcpKeepAliveSettings, const TDuration& expireTime = TDuration::Minutes(6));
//Allows to CreateStub from TStubsHolder under lock
//The callback will be called just during GetStubsHolderLocked call
void GetStubsHolderLocked(const TString& channelId, const TGRpcClientConfig& config, std::function<void(TStubsHolder&)> cb);
void DeleteChannel(const TString& channelId);
- void DeleteExpiredStubsHolders();
+ void DeleteExpiredStubsHolders();
private:
std::shared_mutex RWMutex_;
std::unordered_map<TString, TStubsHolder> Pool_;
- std::multimap<TInstant, TString> LastUsedQueue_;
+ std::multimap<TInstant, TString> LastUsedQueue_;
TTcpKeepAliveSettings TcpKeepAliveSettings_;
- TDuration ExpireTime_;
- TDuration UpdateReUseTime_;
- void EraseFromQueueByTime(const TInstant& lastUseTime, const TString& channelId);
+ TDuration ExpireTime_;
+ TDuration UpdateReUseTime_;
+ void EraseFromQueueByTime(const TInstant& lastUseTime, const TString& channelId);
};
template<class TResponse>