Record Class AvailabilityPolicy
java.lang.Object
java.lang.Record
com.yahoo.search.dispatch.searchcluster.AvailabilityPolicy
public record AvailabilityPolicy(boolean prioritizeAvailability, double minActiveDocsPercentage)
extends Record
Polcies for group availability.
- Author:
- bratseth
-
Constructor Summary
ConstructorsConstructorDescriptionAvailabilityPolicy(boolean prioritizeAvailability, double minActiveDocsPercentage) Creates an instance of aAvailabilityPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static AvailabilityPolicyfrom(com.yahoo.vespa.config.search.DispatchConfig config) final inthashCode()Returns a hash code value for this object.doubleReturns the value of theminActiveDocsPercentagerecord component.booleanReturns the value of theprioritizeAvailabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AvailabilityPolicy
public AvailabilityPolicy(boolean prioritizeAvailability, double minActiveDocsPercentage) Creates an instance of aAvailabilityPolicyrecord class.- Parameters:
prioritizeAvailability- the value for theprioritizeAvailabilityrecord componentminActiveDocsPercentage- the value for theminActiveDocsPercentagerecord component
-
-
Method Details
-
from
-
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 '=='. -
prioritizeAvailability
public boolean prioritizeAvailability()Returns the value of theprioritizeAvailabilityrecord component.- Returns:
- the value of the
prioritizeAvailabilityrecord component
-
minActiveDocsPercentage
public double minActiveDocsPercentage()Returns the value of theminActiveDocsPercentagerecord component.- Returns:
- the value of the
minActiveDocsPercentagerecord component
-