MCPcopy Create free account
hub / github.com/catboost/catboost / Get

Method Get

library/cpp/neh/conn_cache.h:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 bool Get(TConnRef& conn, size_t addrId) {
63 TConnList& connList = ConnList(addrId);
64 TConn* connTmp;
65
66 while (connList.Dequeue(&connTmp)) {
67 connTmp->SetCached(false);
68 CachedConn_.Dec();
69 if (connTmp->IsValid()) {
70 TConnRef(connTmp).Swap(conn);
71 connTmp->DecRef();
72
73 return true;
74 } else {
75 connTmp->UnRef();
76 }
77 }
78 return false;
79 }
80
81 inline size_t Size() const noexcept {
82 return CachedConn_.Val();

Callers 4

PutMethod · 0.45
ValidateMethod · 0.45
PurgeMethod · 0.45
TConnCacheClass · 0.45

Calls 7

SetCachedMethod · 0.80
DequeueMethod · 0.45
DecMethod · 0.45
IsValidMethod · 0.45
SwapMethod · 0.45
DecRefMethod · 0.45
UnRefMethod · 0.45

Tested by

no test coverage detected