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
ConstructorsConstructorDescriptionRetentionResult(int deletedMetrics, int deletedAlerts, int deletedReports, LocalDateTime ranAt, boolean skipped) Creates an instance of aRetentionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedeletedAlertsrecord component.intReturns the value of thedeletedMetricsrecord component.intReturns the value of thedeletedReportsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ranAt()Returns the value of theranAtrecord component.booleanskipped()Returns the value of theskippedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetentionResult
public RetentionResult(int deletedMetrics, int deletedAlerts, int deletedReports, LocalDateTime ranAt, boolean skipped) Creates an instance of aRetentionResultrecord class.- Parameters:
deletedMetrics- the value for thedeletedMetricsrecord componentdeletedAlerts- the value for thedeletedAlertsrecord componentdeletedReports- the value for thedeletedReportsrecord componentranAt- the value for theranAtrecord componentskipped- the value for theskippedrecord component
-
-
Method Details
-
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. -
deletedMetrics
public int deletedMetrics()Returns the value of thedeletedMetricsrecord component.- Returns:
- the value of the
deletedMetricsrecord component
-
deletedAlerts
public int deletedAlerts()Returns the value of thedeletedAlertsrecord component.- Returns:
- the value of the
deletedAlertsrecord component
-
deletedReports
public int deletedReports()Returns the value of thedeletedReportsrecord component.- Returns:
- the value of the
deletedReportsrecord component
-
ranAt
Returns the value of theranAtrecord component.- Returns:
- the value of the
ranAtrecord component
-
skipped
public boolean skipped()Returns the value of theskippedrecord component.- Returns:
- the value of the
skippedrecord component
-