Record Class Engine.FlushResult

java.lang.Object
java.lang.Record
org.elasticsearch.index.engine.Engine.FlushResult
Record Components:
skippedDueToCollision - signifies whether the flush request was skipped due to a collision detected. Specifically it is true if waitIfOngoing==false and an ongoing request is detected, which means the flush request was skipped, else it is false, which means there was no collision and the flush request was processed (even if in the end it did not actually flush anything).
generation - the generation of the index commit of the flush. may be UNKNOWN_GENERATION if unknown, e.g., if the flush was skipped or not performed ultimately.
Enclosing class:
Engine

public static record Engine.FlushResult(boolean skippedDueToCollision, long generation) extends Record
The result of a FlushRequest.
  • Field Details

    • UNKNOWN_GENERATION

      public static final long UNKNOWN_GENERATION
      See Also:
    • FLUSH_REQUEST_SKIPPED_DUE_TO_COLLISION

      public static final Engine.FlushResult FLUSH_REQUEST_SKIPPED_DUE_TO_COLLISION
    • FLUSH_REQUEST_PROCESSED_AND_NOT_PERFORMED

      public static final Engine.FlushResult FLUSH_REQUEST_PROCESSED_AND_NOT_PERFORMED
  • Constructor Details

    • FlushResult

      public FlushResult(boolean skippedDueToCollision, long generation)
      Creates an instance of a FlushResult record class.
      Parameters:
      skippedDueToCollision - the value for the skippedDueToCollision record component
      generation - the value for the generation record component
  • Method Details

    • 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.
    • skippedDueToCollision

      public boolean skippedDueToCollision()
      Returns the value of the skippedDueToCollision record component.
      Returns:
      the value of the skippedDueToCollision record component
    • generation

      public long generation()
      Returns the value of the generation record component.
      Returns:
      the value of the generation record component