segmentstore/server/src/main/java/io/pravega/segmentstore/server/CacheManager.java
public static CacheStatus combine(Iterator<CacheStatus> cacheStates) {
            if (!cacheStates.hasNext()) {
                return new CacheStatus(EMPTY_VALUE, EMPTY_VALUE);
            }

            int minGen = EMPTY_VALUE;
            int maxGen = 0;
            while (cacheStates.hasNext()) {
                CacheStatus cs = cacheStates.next();
                minGen = Math.min(minGen, cs.getOldestGeneration());
                maxGen = Math.max(maxGen, cs.getNewestGeneration());
            }

            return new CacheManager.CacheStatus(minGen, maxGen);
        }
/**
         * Creates a new {@link CacheStatus} instance from the given {@link CacheStatus} instances.
         *
         * @param cacheStates An {@link Iterator} containing {@link CacheStatus} instances.
         * @return A new {@link CacheStatus} instance having {@link #getOldestGeneration()} set to the minimum value
         * of all {@link #getOldestGeneration()} from `cacheStates` and {@link #getNewestGeneration()} set to the maximum
         * of all {@link #getNewestGeneration()} from `cacheStates`. If `cacheStates` is empty, returns an instance with
         * {@link #isEmpty()} set to true.
         */
Creates a new  CacheStatus instance from the given  CacheStatus instances.
@param cacheStates An  Iterator containing  CacheStatus instances.
@return A new  CacheStatus instance having  #getOldestGeneration() set to the minimum value
of all  #getOldestGeneration() from `cacheStates` and  #getNewestGeneration() set to the maximum
of all  #getNewestGeneration() from `cacheStates`. If `cacheStates` is empty, returns an instance with
#isEmpty() set to true.
Creates a new CacheStatus instance from the given CacheStatus instances . @param cacheStates An Iterator containing CacheStatus instances . @return A new CacheStatus instance having #getOldestGeneration () set to the minimum value of all #getOldestGeneration () from ` cacheStates ` and #getNewestGeneration () set to the maximum of all #getNewestGeneration () from ` cacheStates ` . If ` cacheStates ` is empty returns an instance with #isEmpty () set to true .
public static CacheStatus combine(Iterator<CacheStatus> cacheStates) {
            if (!cacheStates.hasNext()) {
                return new CacheStatus(EMPTY_VALUE, EMPTY_VALUE);
            }
            int minGen = EMPTY_VALUE;
            int maxGen = 0;
            while (cacheStates.hasNext()) {
                CacheStatus cs = cacheStates.next();
                minGen = Math.min(minGen, cs.getOldestGeneration());
                maxGen = Math.max(maxGen, cs.getNewestGeneration());
            }
            return new CacheManager.CacheStatus(minGen, maxGen);
        }
public static CacheStatus combine ( Iterator < CacheStatus > cacheStates ) { if ( ! cacheStates . hasNext ( ) ) { return new CacheStatus ( EMPTY_VALUE , EMPTY_VALUE ) ; } int minGen = EMPTY_VALUE ; int maxGen = 0 ; while ( cacheStates . hasNext ( ) ) { CacheStatus cs = cacheStates . next ( ) ; minGen = Math . min ( minGen , cs . getOldestGeneration ( ) ) ; maxGen = Math . max ( maxGen , cs . getNewestGeneration ( ) ) ; } return new CacheManager . CacheStatus ( minGen , maxGen ) ; }
Creates a new {@link CacheStatus} instance from the given {@link CacheStatus} instances.
Creates a new { @link CacheStatus } instance from the given { @link CacheStatus } instances .