synchronized CacheManager . CacheStatus toCacheStatus ( ) { AtomicInteger oldestGeneration = new AtomicInteger ( Integer . MAX_VALUE ) ; AtomicInteger newestGeneration = new AtomicInteger ( 0 ) ; this . generations . keySet ( ) . forEach ( g -> { if ( oldestGeneration . get ( ) > g ) { oldestGeneration . set ( g ) ; } if ( newestGeneration . get ( ) < g ) { newestGeneration . set ( g ) ; } } ) ; return new CacheManager . CacheStatus ( this . totalSize , Math . min ( newestGeneration . get ( ) , oldestGeneration . get ( ) ) , newestGeneration . get ( ) ) ; }
Generates a CacheManager . CacheStatus object with the information in this ReadIndexSummary object .