Interface ForwardAction.Builder

  • Method Details

    • targetGroups

      The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      Parameters:
      targetGroups - The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • targetGroups

      ForwardAction.Builder targetGroups(WeightedTargetGroup... targetGroups)

      The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      Parameters:
      targetGroups - The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • targetGroups

      The target groups. Traffic matching the rule is forwarded to the specified target groups. With forward actions, you can assign a weight that controls the prioritization and selection of each target group. This means that requests are distributed to individual target groups based on their weights. For example, if two target groups have the same weight, each target group receives half of the traffic.

      The default value is 1. This means that if only one target group is provided, there is no need to set the weight; 100% of the traffic goes to that target group.

      This is a convenience method that creates an instance of the WeightedTargetGroup.Builder avoiding the need to create one manually via WeightedTargetGroup.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to targetGroups(List<WeightedTargetGroup>).

      Parameters:
      targetGroups - a consumer that will call methods on WeightedTargetGroup.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: