Record Class BulkOperations.BatchResult
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.bulk.BulkOperations.BatchResult
- Record Components:
processedCount- number of items processed | 处理的项目数errorCount- number of errors | 错误数batchCount- number of batches | 批次数
- Enclosing class:
BulkOperations<K,V>
public static record BulkOperations.BatchResult(int processedCount, int errorCount, int batchCount)
extends Record
Result of batch processing
批处理的结果
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionBatchResult(int processedCount, int errorCount, int batchCount) Creates an instance of aBatchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebatchCountrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theerrorCountrecord component.doubleReturns the error rate | 返回错误率booleanReturns whether there were errors | 返回是否有错误final inthashCode()Returns a hash code value for this object.intReturns the value of theprocessedCountrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BatchResult
public BatchResult(int processedCount, int errorCount, int batchCount) Creates an instance of aBatchResultrecord class.- Parameters:
processedCount- the value for theprocessedCountrecord componenterrorCount- the value for theerrorCountrecord componentbatchCount- the value for thebatchCountrecord component
-
-
Method Details
-
hasErrors
public boolean hasErrors()Returns whether there were errors | 返回是否有错误- Returns:
- true if errors occurred | 有错误返回 true
-
errorRate
public double errorRate()Returns the error rate | 返回错误率- Returns:
- error rate (0.0 to 1.0) | 错误率
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
processedCount
public int processedCount()Returns the value of theprocessedCountrecord component.- Returns:
- the value of the
processedCountrecord component
-
errorCount
public int errorCount()Returns the value of theerrorCountrecord component.- Returns:
- the value of the
errorCountrecord component
-
batchCount
public int batchCount()Returns the value of thebatchCountrecord component.- Returns:
- the value of the
batchCountrecord component
-