Class WeightedDirectTarget
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.dns.DirectTarget
com.yahoo.vespa.hosted.controller.api.integration.dns.WeightedDirectTarget
An implementation of
DirectTarget where is requests are answered based on the weight assigned to the
record, as a proportion of the total weight for all records having the same DNS name.
The portion of received traffic is calculated as follows: (record weight / sum of the weights of all records).
- Author:
- freva
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedDirectTarget(RecordData recordData, com.yahoo.config.provision.zone.ZoneId zone, long weight) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()pack()Returns the fields in this encoded as record datatoString()static WeightedDirectTargetunpack(RecordData data) Unpack weighted alias from given record datalongweight()The weight of this targetMethods inherited from class com.yahoo.vespa.hosted.controller.api.integration.dns.DirectTarget
id, recordData
-
Constructor Details
-
WeightedDirectTarget
public WeightedDirectTarget(RecordData recordData, com.yahoo.config.provision.zone.ZoneId zone, long weight)
-
-
Method Details
-
weight
public long weight()The weight of this target -
pack
Description copied from class:DirectTargetReturns the fields in this encoded as record data- Specified by:
packin classDirectTarget
-
equals
- Overrides:
equalsin classDirectTarget
-
hashCode
public int hashCode()- Overrides:
hashCodein classDirectTarget
-
toString
-
unpack
Unpack weighted alias from given record data
-