Record Class PolicyValidationWarning
java.lang.Object
java.lang.Record
io.github.teceli.resiliencia.compose.PolicyValidationWarning
- Record Components:
outer- thePatternKindsitting further out in the chaininner- thePatternKindbeing added, sitting further inproblem- human-readable description of why this ordering is a footgunsuggestedFix- human-readable suggestion for how to avoid it
- All Implemented Interfaces:
ResilienceEvent
public record PolicyValidationWarning(Instant timestamp, PatternKind outer, PatternKind inner, String problem, String suggestedFix)
extends Record
implements ResilienceEvent
Emitted by
Policy whenever a WARN-severity OrderingRule fires during
Policy.and(Resilient) and construction proceeds — in addition to, not instead of, the
existing SLF4J WARN log line. See docs/architecture/compose/policy.md's
"Observing WARN-severity warnings" section for the full rationale.
ERROR-severity rules (InvalidPolicyException) never produce this event: construction
fails before a Policy instance exists to attach a listener to.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.teceli.resiliencia.core.spi.ResilienceEvent
ResilienceEvent.Listener -
Constructor Summary
ConstructorsConstructorDescriptionPolicyValidationWarning(Instant timestamp, PatternKind outer, PatternKind inner, String problem, String suggestedFix) Creates an instance of aPolicyValidationWarningrecord 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.inner()Returns the value of theinnerrecord component.outer()Returns the value of theouterrecord component.problem()Returns the value of theproblemrecord component.Returns the value of thesuggestedFixrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PolicyValidationWarning
public PolicyValidationWarning(Instant timestamp, PatternKind outer, PatternKind inner, String problem, String suggestedFix) Creates an instance of aPolicyValidationWarningrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentouter- the value for theouterrecord componentinner- the value for theinnerrecord componentproblem- the value for theproblemrecord componentsuggestedFix- the value for thesuggestedFixrecord component
-
-
Method Details
-
patternName
- Specified by:
patternNamein interfaceResilienceEvent
-
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 withObjects::equals(Object,Object). -
timestamp
Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceResilienceEvent- Returns:
- the value of the
timestamprecord component
-
outer
Returns the value of theouterrecord component.- Returns:
- the value of the
outerrecord component
-
inner
Returns the value of theinnerrecord component.- Returns:
- the value of the
innerrecord component
-
problem
Returns the value of theproblemrecord component.- Returns:
- the value of the
problemrecord component
-
suggestedFix
Returns the value of thesuggestedFixrecord component.- Returns:
- the value of the
suggestedFixrecord component
-