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 given
cancelled - whether the run was cancelled before every entry started
stoppedEarly - 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 Details

    • BulkReport

      public BulkReport(List<BulkEntryResult> results, boolean cancelled, boolean stoppedEarly)
      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

      public List<BulkEntryResult> 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

      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 the compare method from their corresponding wrapper classes.
      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.
    • results

      public List<BulkEntryResult> results()
      Returns the value of the results record component.
      Returns:
      the value of the results record component
    • cancelled

      public boolean cancelled()
      Returns the value of the cancelled record component.
      Returns:
      the value of the cancelled record component
    • stoppedEarly

      public boolean stoppedEarly()
      Returns the value of the stoppedEarly record component.
      Returns:
      the value of the stoppedEarly record component