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 at 0.
request - the original request.
result - the result when the request succeeded, otherwise null.
failure - the failure when the request failed, otherwise null.
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 Details

    • Entry

      public Entry(int index, SendRequest request, @Nullable SendResult result, @Nullable BatchSendResult.FailedRecord failure)
      Creates an instance of a Entry record class.
      Parameters:
      index - the value for the index record component
      request - the value for the request record component
      result - the value for the result record component
      failure - the value for the failure record component
  • Method Details

    • isSuccessful

      public boolean isSuccessful()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • request

      public SendRequest request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • result

      public @Nullable SendResult result()
      Returns the value of the result record component.
      Returns:
      the value of the result record component
    • failure

      public @Nullable BatchSendResult.FailedRecord failure()
      Returns the value of the failure record component.
      Returns:
      the value of the failure record component