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
ConstructorsConstructorDescriptionResultChunk(List<String> fields, int chunkNumber, List<ResultMessage> messages) Creates an instance of aResultChunkrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thechunkNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.booleanmessages()Returns the value of themessagesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResultChunk
Creates an instance of aResultChunkrecord class.- Parameters:
fields- the value for thefieldsrecord componentchunkNumber- the value for thechunkNumberrecord componentmessages- the value for themessagesrecord 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 thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
chunkNumber
public int chunkNumber()Returns the value of thechunkNumberrecord component.- Returns:
- the value of the
chunkNumberrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-