code: public synchronized boolean selectInputStreams(
        Collection<EditLogInputStream> streams, long fromTxId,
        long toAtLeastTxId, int minRedundancy) throws IOException {
      
      // at this point we should not have any non-finalized segments
      // this function is called at startup, and must be invoked after
      // recovering all in progress segments
      if (journalSet.hasUnfinalizedSegments(fromTxId)) {
        LOG.fatal("All streams should be finalized");
        throw new IOException("All streams should be finalized at startup");
      }
      
      // get all finalized streams
      boolean redundancyViolated = journalSet.selectInputStreams(streams,
          fromTxId, false, false, minRedundancy);
      
      try {
        checkForGaps(streams, fromTxId, toAtLeastTxId, true);
      } catch (IOException e) {
        closeAllStreams(streams);
        throw e;
      }
      return redundancyViolated;
    }
docs: Select a list of input streams to load.
  
  @param streams, streams to be returned
  @param fromTxId first transaction in the selected streams
  @param toAtLeast the selected streams must contain this transaction
  @param inProgessOk set to true if in-progress streams are OK
  
  @return true if there the redundancy in no met