Record Class IndexMigrationProgress

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

public record IndexMigrationProgress(long total, long created, long updated, long deleted, long versionConflicts, long noops) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexMigrationProgress(long total, long created, long updated, long deleted, long versionConflicts, long noops)
    Creates an instance of a IndexMigrationProgress record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the noops record component.
     
    int
     
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the total record component.
    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

    • IndexMigrationProgress

      public IndexMigrationProgress(long total, long created, long updated, long deleted, long versionConflicts, long noops)
      Creates an instance of a IndexMigrationProgress record class.
      Parameters:
      total - the value for the total record component
      created - the value for the created record component
      updated - the value for the updated record component
      deleted - the value for the deleted record component
      versionConflicts - the value for the versionConflicts record component
      noops - the value for the noops record component
  • Method Details

    • progressPercent

      public int progressPercent()
    • progress

      public BigDecimal progress()
      Returns:
      Value between 0 and 1, progress of the index migration
    • 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 '=='.
      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
    • created

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

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

      public long deleted()
      Returns the value of the deleted record component.
      Returns:
      the value of the deleted 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