Class BatchProcessingResults
java.lang.Object
org.apache.camel.component.docling.BatchProcessingResults
Contains the results of a batch document processing operation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResult(BatchConversionResult result) Adds a conversion result to the batch.longGets the end time of batch processing in milliseconds since epoch.Gets only the failed conversion results.intGets the number of failed document conversions.Gets the list of all conversion results.longGets the start time of batch processing in milliseconds since epoch.intGets the number of successfully converted documents.Gets only the successful conversion results.doubleGets the success rate as a percentage.intGets the total number of documents in the batch.longGets the total processing time for the entire batch in milliseconds.booleanIndicates whether any documents failed to process.booleanIndicates whether any documents were processed successfully.booleanIndicates whether all documents were processed successfully.voidsetEndTimeMs(long endTimeMs) voidsetFailureCount(int failureCount) voidsetResults(List<BatchConversionResult> results) voidsetStartTimeMs(long startTimeMs) voidsetSuccessCount(int successCount) voidsetTotalDocuments(int totalDocuments) voidsetTotalProcessingTimeMs(long totalProcessingTimeMs) toString()
-
Constructor Details
-
BatchProcessingResults
public BatchProcessingResults() -
BatchProcessingResults
-
-
Method Details
-
getResults
Gets the list of all conversion results.- Returns:
- list of batch conversion results
-
setResults
-
addResult
Adds a conversion result to the batch.- Parameters:
result- the result to add
-
getSuccessful
Gets only the successful conversion results.- Returns:
- list of successful results
-
getFailed
Gets only the failed conversion results.- Returns:
- list of failed results
-
getTotalDocuments
public int getTotalDocuments()Gets the total number of documents in the batch.- Returns:
- total document count
-
setTotalDocuments
public void setTotalDocuments(int totalDocuments) -
getSuccessCount
public int getSuccessCount()Gets the number of successfully converted documents.- Returns:
- success count
-
setSuccessCount
public void setSuccessCount(int successCount) -
getFailureCount
public int getFailureCount()Gets the number of failed document conversions.- Returns:
- failure count
-
setFailureCount
public void setFailureCount(int failureCount) -
getTotalProcessingTimeMs
public long getTotalProcessingTimeMs()Gets the total processing time for the entire batch in milliseconds.- Returns:
- total processing time
-
setTotalProcessingTimeMs
public void setTotalProcessingTimeMs(long totalProcessingTimeMs) -
getStartTimeMs
public long getStartTimeMs()Gets the start time of batch processing in milliseconds since epoch.- Returns:
- start time
-
setStartTimeMs
public void setStartTimeMs(long startTimeMs) -
getEndTimeMs
public long getEndTimeMs()Gets the end time of batch processing in milliseconds since epoch.- Returns:
- end time
-
setEndTimeMs
public void setEndTimeMs(long endTimeMs) -
isAllSuccessful
public boolean isAllSuccessful()Indicates whether all documents were processed successfully.- Returns:
- true if all successful, false otherwise
-
hasAnySuccessful
public boolean hasAnySuccessful()Indicates whether any documents were processed successfully.- Returns:
- true if at least one success, false otherwise
-
hasAnyFailures
public boolean hasAnyFailures()Indicates whether any documents failed to process.- Returns:
- true if at least one failure, false otherwise
-
getSuccessRate
public double getSuccessRate()Gets the success rate as a percentage.- Returns:
- success rate (0.0 to 100.0)
-
toString
-