docs: private void loadSomeKeys(final HashSet<IndexScopedKey> keysCollector, final Set<IndexScopedKey> keysToExclude, final int maxElements) {
        if (maxElements <= 0) {
           return;
        }
        int collectedKeys = 0;
        try {
           //First we collect the (single) FileListCacheKey
           String[] listAll = directory.listAll();
           if (listAll.length != 0) {
              FileListCacheKey rootKey = new FileListCacheKey(indexName, affinitySegmentId);
              if (keysToExclude == null || !keysToExclude.contains(rootKey)) { //unless it was excluded
                 if (keysCollector.add(rootKey)) { //unless it was already collected
                    collectedKeys++;
                 }
              }
           }
           //Now we collect first all FileCacheKey (keys for file metadata)
           for (String fileName : listAll) {
              if (collectedKeys >= maxElements) return;
              FileCacheKey key = new FileCacheKey(indexName, fileName, affinitySegmentId);
              if (keysToExclude == null || !keysToExclude.contains(key)) {
                 if (keysCollector.add(key)) {
                    if (++collectedKeys >= maxElements) return;
                 }
              }
           }
           //Next we load the ChunkCacheKey (keys for file contents)
           for (String fileName : listAll) {
              int numChunksInt = figureChunksNumber(fileName);
              for (int i = 0; i < numChunksInt; i++) {
                 //Inner loop: we actually have several Chunks per file name
                 ChunkCacheKey key = new ChunkCacheKey(indexName, fileName, i, autoChunkSize, affinitySegmentId);
                 if (keysToExclude == null || !keysToExclude.contains(key)) {
                    if (keysCollector.add(key)) {
                       if (++collectedKeys >= maxElements) return;
                    }
                 }
              }
           }
        } catch (IOException e) {
           throw log.exceptionInCacheLoader(e);
        }
     }