Record Class DiscoveryHealthChecker.DiscoveryValidationResult
java.lang.Object
java.lang.Record
com.loomcache.server.discovery.DiscoveryHealthChecker.DiscoveryValidationResult
- Enclosing class:
DiscoveryHealthChecker
public static record DiscoveryHealthChecker.DiscoveryValidationResult(List<PeerAddress> validPeers, List<String> issues)
extends Record
Result of a discovery validation check.
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryValidationResult(List<PeerAddress> validPeers, List<String> issues) Creates an instance of aDiscoveryValidationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intGet the count of issues found.final inthashCode()Returns a hash code value for this object.booleanCheck if validation passed without issues.issues()Returns the value of theissuesrecord component.toString()Returns a string representation of this record class.Returns the value of thevalidPeersrecord component.
-
Constructor Details
-
DiscoveryValidationResult
Creates an instance of aDiscoveryValidationResultrecord class.- Parameters:
validPeers- the value for thevalidPeersrecord componentissues- the value for theissuesrecord component
-
-
Method Details
-
isHealthy
public boolean isHealthy()Check if validation passed without issues.- Returns:
- true if no issues were detected
-
getIssueCount
public int getIssueCount()Get the count of issues found.- Returns:
- number of validation issues
-
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 withObjects::equals(Object,Object). -
validPeers
Returns the value of thevalidPeersrecord component.- Returns:
- the value of the
validPeersrecord component
-
issues
-