Class WeightedAliasTarget
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.dns.AliasTarget
com.yahoo.vespa.hosted.controller.api.integration.dns.WeightedAliasTarget
An implementation of
AliasTarget 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:
- mpolden
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedAliasTarget(ai.vespa.http.DomainName name, String dnsZone, String id, long weight) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()pack()Returns the fields in this encoded as record datatoString()static WeightedAliasTargetunpack(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.AliasTarget
dnsZone, id, name
-
Constructor Details
-
WeightedAliasTarget
-
-
Method Details
-
weight
public long weight()The weight of this target -
pack
Description copied from class:AliasTargetReturns the fields in this encoded as record data- Specified by:
packin classAliasTarget
-
equals
- Overrides:
equalsin classAliasTarget
-
hashCode
public int hashCode()- Overrides:
hashCodein classAliasTarget
-
toString
-
unpack
Unpack weighted alias from given record data
-