Record Class InferenceOperator.BulkInferenceRequestItem
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.inference.InferenceOperator.BulkInferenceRequestItem
- Record Components:
inferenceRequest- The inference request (may be null to represent a null input).positionValueCounts- Array where each element indicates how many values the corresponding input position contributed. For example, [1, 0, 2] means position 0 contributed 1 value, position 1 was null/empty, and position 2 contributed 2 values (multi-valued field).seqNo- The sequence number for ordering.
- Enclosing class:
InferenceOperator
public static record InferenceOperator.BulkInferenceRequestItem(InferenceAction.Request inferenceRequest, int[] positionValueCounts, long seqNo)
extends Record
Represents a single inference request with metadata for result building.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructing position value counts arrays dynamically. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]static final int[] -
Constructor Summary
ConstructorsConstructorDescriptionBulkInferenceRequestItem(InferenceAction.Request inferenceRequest, int[] positionValueCounts, long seqNo) Creates an instance of aBulkInferenceRequestItemrecord class.BulkInferenceRequestItem(InferenceAction.Request inferenceRequest, InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder positionValueCounts) Constructor for batched requests without sequence number. -
Method Summary
Modifier and TypeMethodDescriptioncreateResponse(InferenceAction.Response inferenceResponse) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinferenceRequestrecord component.int[]Returns the value of thepositionValueCountsrecord component.positionValueCountsBuilder(int capacity) longseqNo()Returns the value of theseqNorecord component.final StringtoString()Returns a string representation of this record class.withSeqNo(long seqNo)
-
Field Details
-
SINGLE_ZERO_POSITION_VALUE_COUNTS
public static final int[] SINGLE_ZERO_POSITION_VALUE_COUNTS -
SINGLE_ONE_POSITION_VALUE_COUNTS
public static final int[] SINGLE_ONE_POSITION_VALUE_COUNTS
-
-
Constructor Details
-
BulkInferenceRequestItem
public BulkInferenceRequestItem(InferenceAction.Request inferenceRequest, InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder positionValueCounts) Constructor for batched requests without sequence number. -
BulkInferenceRequestItem
public BulkInferenceRequestItem(InferenceAction.Request inferenceRequest, int[] positionValueCounts, long seqNo) Creates an instance of aBulkInferenceRequestItemrecord class.- Parameters:
inferenceRequest- the value for theinferenceRequestrecord componentpositionValueCounts- the value for thepositionValueCountsrecord componentseqNo- the value for theseqNorecord component
-
-
Method Details
-
positionValueCountsBuilder
public static InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder positionValueCountsBuilder() -
positionValueCountsBuilder
public static InferenceOperator.BulkInferenceRequestItem.PositionValueCountsBuilder positionValueCountsBuilder(int capacity) -
withSeqNo
-
createResponse
public InferenceOperator.BulkInferenceResponseItem createResponse(InferenceAction.Response inferenceResponse) -
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 '=='. -
inferenceRequest
Returns the value of theinferenceRequestrecord component.- Returns:
- the value of the
inferenceRequestrecord component
-
positionValueCounts
public int[] positionValueCounts()Returns the value of thepositionValueCountsrecord component.- Returns:
- the value of the
positionValueCountsrecord component
-
seqNo
public long seqNo()Returns the value of theseqNorecord component.- Returns:
- the value of the
seqNorecord component
-