Package dev.shamoo.runtime.core
Record Class QuarantinePolicy
java.lang.Object
java.lang.Record
dev.shamoo.runtime.core.QuarantinePolicy
public record QuarantinePolicy(int failuresBeforeQuarantine, boolean quarantineResourceLeaks)
extends Record
Explicit policy for moving repeated failures or resource leaks into quarantine.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQuarantinePolicy(int failuresBeforeQuarantine, boolean quarantineResourceLeaks) Creates an instance of aQuarantinePolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefailuresBeforeQuarantinerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thequarantineResourceLeaksrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
QuarantinePolicy
public QuarantinePolicy(int failuresBeforeQuarantine, boolean quarantineResourceLeaks) Creates an instance of aQuarantinePolicyrecord class.- Parameters:
failuresBeforeQuarantine- the value for thefailuresBeforeQuarantinerecord componentquarantineResourceLeaks- the value for thequarantineResourceLeaksrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
failuresBeforeQuarantine
public int failuresBeforeQuarantine()Returns the value of thefailuresBeforeQuarantinerecord component.- Returns:
- the value of the
failuresBeforeQuarantinerecord component
-
quarantineResourceLeaks
public boolean quarantineResourceLeaks()Returns the value of thequarantineResourceLeaksrecord component.- Returns:
- the value of the
quarantineResourceLeaksrecord component
-