优化代码

This commit is contained in:
zhouhao
2017-04-25 17:56:17 +08:00
parent 2299c8519f
commit 50ea1a9514

View File

@@ -190,7 +190,7 @@ public class CacheMonitorController {
protected long getTimes(CacheManager cacheManager, TimesGetter getter) {
long times = cacheManager.getCacheNames().parallelStream()
.map(name -> cacheManager.getCache(name))
.map(cacheManager::getCache)
.filter(cache -> cache instanceof MonitorCache)
.map(cache -> (MonitorCache) cache)
.mapToLong(getter::get)