Package org.graylog2.indexer.results
Record Class ResultChunk
java.lang.Object
java.lang.Record
org.graylog2.indexer.results.ResultChunk
public record ResultChunk(List<String> fields, int chunkNumber, List<ResultMessage> messages)
extends Record
A part/chunk of search results for messages.
Retrieval method of the chunk (scrolling, search_after pagination...) should not affect this interface implementations.
-
Constructor Summary
ConstructorDescriptionResultChunk
(List<String> fields, int chunkNumber, List<ResultMessage> messages) Creates an instance of aResultChunk
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thechunkNumber
record component.final boolean
Indicates whether some other object is "equal to" this one.fields()
Returns the value of thefields
record component.final int
hashCode()
Returns a hash code value for this object.boolean
messages()
Returns the value of themessages
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ResultChunk
Creates an instance of aResultChunk
record class.- Parameters:
fields
- the value for thefields
record componentchunkNumber
- the value for thechunkNumber
record componentmessages
- the value for themessages
record component
-
-
Method Details
-
isFirstChunk
public boolean isFirstChunk() -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
fields
Returns the value of thefields
record component.- Returns:
- the value of the
fields
record component
-
chunkNumber
public int chunkNumber()Returns the value of thechunkNumber
record component.- Returns:
- the value of the
chunkNumber
record component
-
messages
Returns the value of themessages
record component.- Returns:
- the value of the
messages
record component
-