Module org.elasticsearch.server
Package org.elasticsearch.index.engine
Record Class Engine.RefreshResult
java.lang.Object
java.lang.Record
org.elasticsearch.index.engine.Engine.RefreshResult
- Enclosing class:
- Engine
Captures the result of a refresh operation on the index shard.
refreshed is true if a refresh happened. If refreshed, generation
contains the generation of the index commit that the reader has opened upon refresh.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRefreshResult(boolean refreshed) RefreshResult(boolean refreshed, long generation) Creates an instance of aRefreshResultrecord 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 therefreshedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
UNKNOWN_GENERATION
public static final long UNKNOWN_GENERATION- See Also:
-
NO_REFRESH
-
-
Constructor Details
-
RefreshResult
public RefreshResult(boolean refreshed) -
RefreshResult
public RefreshResult(boolean refreshed, long generation) Creates an instance of aRefreshResultrecord class.- Parameters:
refreshed- the value for therefreshedrecord 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 '=='. -
refreshed
public boolean refreshed()Returns the value of therefreshedrecord component.- Returns:
- the value of the
refreshedrecord component
-
generation
public long generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-