protected int getMaxBlockNumber() { // Ignore cross-segment: We either send all blocks, if the segment has been encoded, or // only the data blocks, if it hasn't (even if the cross-segment blocks have been encoded). if(segment.hasEncoded()) return segment.totalBlockCount; else return segment.dataBlockCount; }
public int countEncodedSegments() { int total = 0; for(SplitFileInserterSegmentStorage segment : segments) { if(segment.hasEncoded()) total++; } return total; }
private boolean anySegmentNotEncoded(SplitFileInserterStorage storage) { for(SplitFileInserterSegmentStorage segment : storage.segments) if(!segment.hasEncoded()) return true; if(storage.crossSegments != null) { for(SplitFileInserterCrossSegmentStorage segment : storage.crossSegments) if(!segment.hasEncodedSuccessfully()) return true; } return false; }