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

    Constructors
    Constructor
    Description
    BatchResult(int processedCount, int errorCount, int batchCount)
    Creates an instance of a BatchResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the batchCount record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the errorCount record component.
    double
    Returns the error rate | 返回错误率
    boolean
    Returns whether there were errors | 返回是否有错误
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the processedCount record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BatchResult

      public BatchResult(int processedCount, int errorCount, int batchCount)
      Creates an instance of a BatchResult record class.
      Parameters:
      processedCount - the value for the processedCount record component
      errorCount - the value for the errorCount record component
      batchCount - the value for the batchCount record 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • processedCount

      public int processedCount()
      Returns the value of the processedCount record component.
      Returns:
      the value of the processedCount record component
    • errorCount

      public int errorCount()
      Returns the value of the errorCount record component.
      Returns:
      the value of the errorCount record component
    • batchCount

      public int batchCount()
      Returns the value of the batchCount record component.
      Returns:
      the value of the batchCount record component