code: 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());
      }
docs: Generates a CacheManager.CacheStatus object with the information in this ReadIndexSummary object.