/** * Creates and initializes a BatchInterrupted object. * * @param reason exception that caused batch processing to stop * @param totalCount number of entries parsed so far, note that * it is to be expected that {@code totalCount >= successCount + errorCount} * @param successCount number of entries processed successfully so far * @param errorCount number of entries rejected so far * @throws IllegalArgumentException if the total count is less than * successCount - errorCount */ public BatchInterrupted(String reason, int totalCount, int successCount, int errorCount) { this(); if (totalCount < (successCount - errorCount)) { throw new IllegalArgumentException("total < success + error. total = " + totalCount + " success=" + successCount + " error=" + errorCount); } setReason(reason); setTotalCount(totalCount); setSuccessCount(successCount); setErrorCount(errorCount); setSkippedCount(totalCount - (successCount + errorCount)); }
/** * Creates and initializes a BatchInterrupted object. * * @param reason exception that caused batch processing to stop * @param totalCount number of entries parsed so far, note that * it is to be expected that {@code totalCount >= successCount + errorCount} * @param successCount number of entries processed successfully so far * @param errorCount number of entries rejected so far * @throws IllegalArgumentException if the total count is less than * successCount - errorCount */ public BatchInterrupted(String reason, int totalCount, int successCount, int errorCount) { this(); if (totalCount < (successCount - errorCount)) { throw new IllegalArgumentException("total < success + error. total = " + totalCount + " success=" + successCount + " error=" + errorCount); } setReason(reason); setTotalCount(totalCount); setSuccessCount(successCount); setErrorCount(errorCount); setSkippedCount(totalCount - (successCount + errorCount)); }
/** * Creates and initializes a BatchInterrupted object. * * @param reason exception that caused batch processing to stop * @param totalCount number of entries parsed so far, note that * it is to be expected that {@code totalCount >= successCount + errorCount} * @param successCount number of entries processed successfully so far * @param errorCount number of entries rejected so far * @throws IllegalArgumentException if the total count is less than * successCount - errorCount */ public BatchInterrupted(String reason, int totalCount, int successCount, int errorCount) { this(); if (totalCount < (successCount - errorCount)) { throw new IllegalArgumentException("total < success + error. total = " + totalCount + " success=" + successCount + " error=" + errorCount); } setReason(reason); setTotalCount(totalCount); setSuccessCount(successCount); setErrorCount(errorCount); setSkippedCount(totalCount - (successCount + errorCount)); }