Record Class BulkReport
java.lang.Object
java.lang.Record
lol.trq.alts.bulk.BulkReport
- Record Components:
results- one entry per item that ran, in the order they were givencancelled- whether the run was cancelled before every entry startedstoppedEarly- whether the run stopped itself because the service asked it to slow down
public record BulkReport(List<BulkEntryResult> results, boolean cancelled, boolean stoppedEarly)
extends Record
What a whole bulk run came to.
cancelled and stoppedEarly both mean "fewer entries ran than you asked for", and
they are kept apart because they call for opposite responses: one is the user's own doing, the other
is the service asking to be left alone. Neither is the same as a run where everything ran and some
entries failed.
- Since:
- 0.9.0
-
Constructor Summary
ConstructorsConstructorDescriptionBulkReport(List<BulkEntryResult> results, boolean cancelled, boolean stoppedEarly) Defensively copies the results, so a report cannot be edited after the fact. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecancelledrecord component.booleancomplete()Returns whether every entry that ran succeeded and none were skipped.final booleanIndicates whether some other object is "equal to" this one.failures()Returns the entries that failed, for a host listing what needs attention.final inthashCode()Returns a hash code value for this object.results()Returns the value of theresultsrecord component.booleanReturns the value of thestoppedEarlyrecord component.intReturns how many entries succeeded.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BulkReport
Defensively copies the results, so a report cannot be edited after the fact.- Since:
- 0.9.0
-
-
Method Details
-
succeeded
public int succeeded()Returns how many entries succeeded.- Returns:
- the successful count
- Since:
- 0.9.0
-
failures
Returns the entries that failed, for a host listing what needs attention.- Returns:
- the failed results, in order
- Since:
- 0.9.0
-
complete
public boolean complete()Returns whether every entry that ran succeeded and none were skipped.- Returns:
- true if the run was complete and clean
- Since:
- 0.9.0
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
results
-
cancelled
-
stoppedEarly
public boolean stoppedEarly()Returns the value of thestoppedEarlyrecord component.- Returns:
- the value of the
stoppedEarlyrecord component
-