Record Class RejectedLogEventsInfo

java.lang.Object
java.lang.Record
codes.grow.packages.cloudwatchlogs.RejectedLogEventsInfo
Record Components:
batch - index of the batch within the call (0-based)
tooOldLogEventEndIndex - events before this index (exclusive end) were older than 14 days or the retention
tooNewLogEventStartIndex - events from this index on were more than 2 hours in the future
expiredLogEventEndIndex - events before this index (exclusive end) were older than the retention period

public record RejectedLogEventsInfo(int batch, OptionalInt tooOldLogEventEndIndex, OptionalInt tooNewLogEventStartIndex, OptionalInt expiredLogEventEndIndex) extends Record
Events of one batch that the service did not store (indexes into the sorted batch). As returned by AWS the end indexes are exclusive and the start index is inclusive; Moto 5.2.4 returns end indexes one lower.
  • Constructor Details

    • RejectedLogEventsInfo

      public RejectedLogEventsInfo(int batch, OptionalInt tooOldLogEventEndIndex, OptionalInt tooNewLogEventStartIndex, OptionalInt expiredLogEventEndIndex)
      Normalises absent values (null lists become empty, null optionals empty).
      Parameters:
      batch - index of the batch within the call (0-based)
      tooOldLogEventEndIndex - events before this index (exclusive end) were older than 14 days or the retention
      tooNewLogEventStartIndex - events from this index on were more than 2 hours in the future
      expiredLogEventEndIndex - events before this index (exclusive end) were older than the retention period
  • Method Details

    • 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.
    • batch

      public int batch()
      Returns the value of the batch record component.
      Returns:
      the value of the batch record component
    • tooOldLogEventEndIndex

      public OptionalInt tooOldLogEventEndIndex()
      Returns the value of the tooOldLogEventEndIndex record component.
      Returns:
      the value of the tooOldLogEventEndIndex record component
    • tooNewLogEventStartIndex

      public OptionalInt tooNewLogEventStartIndex()
      Returns the value of the tooNewLogEventStartIndex record component.
      Returns:
      the value of the tooNewLogEventStartIndex record component
    • expiredLogEventEndIndex

      public OptionalInt expiredLogEventEndIndex()
      Returns the value of the expiredLogEventEndIndex record component.
      Returns:
      the value of the expiredLogEventEndIndex record component