Record Class RetentionService.RetentionResult

java.lang.Object
java.lang.Record
com.nmontytskyi.monitoring.server.service.RetentionService.RetentionResult
Enclosing class:
RetentionService

public static record RetentionService.RetentionResult(int deletedMetrics, int deletedAlerts, int deletedReports, LocalDateTime ranAt, boolean skipped) extends Record
Author:
Nazar Montytskyi
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetentionResult(int deletedMetrics, int deletedAlerts, int deletedReports, LocalDateTime ranAt, boolean skipped)
    Creates an instance of a RetentionResult record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the deletedAlerts record component.
    int
    Returns the value of the deletedMetrics record component.
    int
    Returns the value of the deletedReports record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the ranAt record component.
    boolean
    Returns the value of the skipped record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • RetentionResult

      public RetentionResult(int deletedMetrics, int deletedAlerts, int deletedReports, LocalDateTime ranAt, boolean skipped)
      Creates an instance of a RetentionResult record class.
      Parameters:
      deletedMetrics - the value for the deletedMetrics record component
      deletedAlerts - the value for the deletedAlerts record component
      deletedReports - the value for the deletedReports record component
      ranAt - the value for the ranAt record component
      skipped - the value for the skipped record component
  • 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 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.
    • deletedMetrics

      public int deletedMetrics()
      Returns the value of the deletedMetrics record component.
      Returns:
      the value of the deletedMetrics record component
    • deletedAlerts

      public int deletedAlerts()
      Returns the value of the deletedAlerts record component.
      Returns:
      the value of the deletedAlerts record component
    • deletedReports

      public int deletedReports()
      Returns the value of the deletedReports record component.
      Returns:
      the value of the deletedReports record component
    • ranAt

      public LocalDateTime ranAt()
      Returns the value of the ranAt record component.
      Returns:
      the value of the ranAt record component
    • skipped

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