MCPcopy Create free account
hub / github.com/facebook/CacheLib / getResizeStrategy

Method getResizeStrategy

cachelib/allocator/Cache.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50std::shared_ptr<RebalanceStrategy> CacheBase::getResizeStrategy(
51 PoolId pid) const {
52 std::unique_lock<std::mutex> l(lock_);
53 auto it = poolResizeStrategies_.find(pid);
54 if (it != poolResizeStrategies_.end() && it->second) {
55 return it->second;
56 }
57 return nullptr;
58}
59
60void CacheBase::setPoolOptimizeStrategy(
61 std::shared_ptr<PoolOptimizeStrategy> strategy) {

Callers 1

workMethod · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected