Record Class TaskStatus

java.lang.Object
java.lang.Record
org.graylog2.indexer.migration.TaskStatus

public record TaskStatus(long total, long updated, long created, long deleted, long batches, long versionConflicts, long noops, List<String> failures) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    TaskStatus(long total, long updated, long created, long deleted, long batches, long versionConflicts, long noops, List<String> failures)
    Creates an instance of a TaskStatus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the batches record component.
    long
    Returns the value of the created record component.
    long
    Returns the value of the deleted record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    static TaskStatus
    failure(String failure)
     
    Returns the value of the failures record component.
    boolean
     
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the noops record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the total record component.
    static TaskStatus
     
    long
    Returns the value of the updated record component.
    long
    Returns the value of the versionConflicts record component.

    Methods inherited from class java.lang.Object

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

    • TaskStatus

      public TaskStatus(long total, long updated, long created, long deleted, long batches, long versionConflicts, long noops, List<String> failures)
      Creates an instance of a TaskStatus record class.
      Parameters:
      total - the value for the total record component
      updated - the value for the updated record component
      created - the value for the created record component
      deleted - the value for the deleted record component
      batches - the value for the batches record component
      versionConflicts - the value for the versionConflicts record component
      noops - the value for the noops record component
      failures - the value for the failures record component
  • Method Details

    • unknown

      public static TaskStatus unknown()
    • failure

      public static TaskStatus failure(String failure)
    • hasFailures

      public boolean hasFailures()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • total

      public long total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • updated

      public long updated()
      Returns the value of the updated record component.
      Returns:
      the value of the updated record component
    • created

      public long created()
      Returns the value of the created record component.
      Returns:
      the value of the created record component
    • deleted

      public long deleted()
      Returns the value of the deleted record component.
      Returns:
      the value of the deleted record component
    • batches

      public long batches()
      Returns the value of the batches record component.
      Returns:
      the value of the batches record component
    • versionConflicts

      public long versionConflicts()
      Returns the value of the versionConflicts record component.
      Returns:
      the value of the versionConflicts record component
    • noops

      public long noops()
      Returns the value of the noops record component.
      Returns:
      the value of the noops record component
    • failures

      public List<String> failures()
      Returns the value of the failures record component.
      Returns:
      the value of the failures record component