| 48 | } |
| 49 | |
| 50 | std::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 | |
| 60 | void CacheBase::setPoolOptimizeStrategy( |
| 61 | std::shared_ptr<PoolOptimizeStrategy> strategy) { |