Module org.elasticsearch.server
Package org.elasticsearch.index.engine
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 istrueifwaitIfOngoing==falseand an ongoing request is detected, which means the flush request was skipped, else it isfalse, 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 beUNKNOWN_GENERATIONif 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Engine.FlushResultstatic final Engine.FlushResultstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionFlushResult(boolean skippedDueToCollision, long generation) Creates an instance of aFlushResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theskippedDueToCollisionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
UNKNOWN_GENERATION
public static final long UNKNOWN_GENERATION- See Also:
-
FLUSH_REQUEST_SKIPPED_DUE_TO_COLLISION
-
FLUSH_REQUEST_PROCESSED_AND_NOT_PERFORMED
-
-
Constructor Details
-
FlushResult
public FlushResult(boolean skippedDueToCollision, long generation) Creates an instance of aFlushResultrecord class.- Parameters:
skippedDueToCollision- the value for theskippedDueToCollisionrecord componentgeneration- the value for thegenerationrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
skippedDueToCollision
public boolean skippedDueToCollision()Returns the value of theskippedDueToCollisionrecord component.- Returns:
- the value of the
skippedDueToCollisionrecord component
-
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-