Record Class FrequentLogSuppressor.Decision
java.lang.Object
java.lang.Record
com.loomcache.server.logging.FrequentLogSuppressor.Decision
- Enclosing class:
FrequentLogSuppressor
public static record FrequentLogSuppressor.Decision(boolean shouldLog, long suppressedSinceLastLog)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionDecision(boolean shouldLog, long suppressedSinceLastLog) Creates an instance of aDecisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theshouldLogrecord component.longReturns the value of thesuppressedSinceLastLogrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Decision
public Decision(boolean shouldLog, long suppressedSinceLastLog) Creates an instance of aDecisionrecord class.- Parameters:
shouldLog- the value for theshouldLogrecord componentsuppressedSinceLastLog- the value for thesuppressedSinceLastLogrecord component
-
-
Method Details
-
summarySuffix
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
shouldLog
public boolean shouldLog()Returns the value of theshouldLogrecord component.- Returns:
- the value of the
shouldLogrecord component
-
suppressedSinceLastLog
public long suppressedSinceLastLog()Returns the value of thesuppressedSinceLastLogrecord component.- Returns:
- the value of the
suppressedSinceLastLogrecord component
-