Record Class BatchResult
java.lang.Object
java.lang.Record
io.awspring.cloud.sns.core.batch.BatchResult
- Record Components:
results- Collection of successful message resultserrors- Collection of failed message errors
public record BatchResult(Collection<BatchResult.SnsResult> results, Collection<BatchResult.SnsError> errors)
extends Record
Result of a batch publish operation to SNS.
Contains both successful results and errors from the batch operation. Use hasErrors() or
isFullySuccessful() to check the overall status of the batch operation.
- Since:
- 4.1.0
- Author:
- Matej Nedic
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a failed message in a batch operation.static final recordRepresents a successfully published message in a batch operation. -
Constructor Summary
ConstructorsConstructorDescriptionBatchResult(Collection<BatchResult.SnsResult> results, Collection<BatchResult.SnsError> errors) Creates an instance of aBatchResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.booleanChecks if any messages in the batch failed to publish.final inthashCode()Returns a hash code value for this object.booleanChecks if all messages in the batch were successfully published.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BatchResult
public BatchResult(Collection<BatchResult.SnsResult> results, Collection<BatchResult.SnsError> errors) Creates an instance of aBatchResultrecord class.
-
-
Method Details
-
hasErrors
public boolean hasErrors()Checks if any messages in the batch failed to publish.- Returns:
- true if there are any errors, false otherwise
-
isFullySuccessful
public boolean isFullySuccessful()Checks if all messages in the batch were successfully published.- Returns:
- true if there are no errors, false otherwise
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
results
-
errors
-