@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class WeightedTarget extends Object implements Serializable, Cloneable, StructuredPojo
An object that represents a target and its relative weight. Traffic is distributed across targets according to their relative weight. For example, a weighted target with a relative weight of 50 receives five times as much traffic as one with a relative weight of 10. The total weight for all targets combined must be less than or equal to 100.
Constructor and Description |
---|
WeightedTarget() |
Modifier and Type | Method and Description |
---|---|
WeightedTarget |
clone() |
boolean |
equals(Object obj) |
String |
getVirtualNode()
The virtual node to associate with the weighted target.
|
Integer |
getWeight()
The relative weight of the weighted target.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setVirtualNode(String virtualNode)
The virtual node to associate with the weighted target.
|
void |
setWeight(Integer weight)
The relative weight of the weighted target.
|
String |
toString()
Returns a string representation of this object.
|
WeightedTarget |
withVirtualNode(String virtualNode)
The virtual node to associate with the weighted target.
|
WeightedTarget |
withWeight(Integer weight)
The relative weight of the weighted target.
|
public void setVirtualNode(String virtualNode)
The virtual node to associate with the weighted target.
virtualNode
- The virtual node to associate with the weighted target.public String getVirtualNode()
The virtual node to associate with the weighted target.
public WeightedTarget withVirtualNode(String virtualNode)
The virtual node to associate with the weighted target.
virtualNode
- The virtual node to associate with the weighted target.public void setWeight(Integer weight)
The relative weight of the weighted target.
weight
- The relative weight of the weighted target.public Integer getWeight()
The relative weight of the weighted target.
public WeightedTarget withWeight(Integer weight)
The relative weight of the weighted target.
weight
- The relative weight of the weighted target.public String toString()
toString
in class Object
Object.toString()
public WeightedTarget clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.