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 aRefreshResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of thegeneration
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of therefreshed
record component.final String
toString()
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 aRefreshResult
record class.- Parameters:
refreshed
- the value for therefreshed
record componentgeneration
- the value for thegeneration
record 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 therefreshed
record component.- Returns:
- the value of the
refreshed
record component
-
generation
public long generation()Returns the value of thegeneration
record component.- Returns:
- the value of the
generation
record component
-