Record Class BatchSendResult.Entry
java.lang.Object
java.lang.Record
io.awspring.cloud.kinesis.operations.BatchSendResult.Entry
- Record Components:
index- the position of the request in the batch, starting at0.request- the original request.result- the result when the request succeeded, otherwisenull.failure- the failure when the request failed, otherwisenull.
- Enclosing class:
- BatchSendResult
public static record BatchSendResult.Entry(int index, SendRequest request, @Nullable SendResult result, @Nullable BatchSendResult.FailedRecord failure)
extends Record
One request of the batch in its request-order position, holding either its
SendResult when it succeeded or
its BatchSendResult.FailedRecord when it failed. A request retried into a later success is reported once, as successful.-
Constructor Summary
ConstructorsConstructorDescriptionEntry(int index, SendRequest request, @Nullable SendResult result, @Nullable BatchSendResult.FailedRecord failure) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable BatchSendResult.FailedRecordfailure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.booleanrequest()Returns the value of therequestrecord component.@Nullable SendResultresult()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
public Entry(int index, SendRequest request, @Nullable SendResult result, @Nullable BatchSendResult.FailedRecord failure) Creates an instance of aEntryrecord class.
-
-
Method Details
-
isSuccessful
public boolean isSuccessful() -
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 '=='. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
request
Returns the value of therequestrecord component.- Returns:
- the value of the
requestrecord component
-
result
Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-