Package com.azure.cosmos
Class ThroughputControlGroupConfigBuilder
java.lang.Object
com.azure.cosmos.ThroughputControlGroupConfigBuilder
@Beta(value=V4_13_0,
warningText="Preview API - subject to change in non-backwards compatible way")
public class ThroughputControlGroupConfigBuilder
extends Object
The throughput control group config builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Validate the throughput configuration and create a new throughput control group config item.continueOnInitError
(boolean continueOnInitError) Set whether allow request to continue on original request flow if throughput control controller failed on initialization.defaultControlGroup
(boolean aDefault) Set whether this throughput control group will be used by default.Set the throughput control group name.setDefault
(boolean aDefault) Deprecated.setGroupName
(String groupName) Deprecated.setTargetThroughput
(int targetThroughput) Deprecated.setTargetThroughputThreshold
(double targetThroughputThreshold) Deprecated.targetThroughput
(int targetThroughput) Set the throughput control group target throughput.targetThroughputThreshold
(double targetThroughputThreshold) Set the throughput control group target throughput threshold.
-
Constructor Details
-
ThroughputControlGroupConfigBuilder
public ThroughputControlGroupConfigBuilder()
-
-
Method Details
-
setGroupName
@Deprecated @Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder setGroupName(String groupName) Deprecated.Set the throughput control group name.- Parameters:
groupName
- The throughput control group name.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
groupName
@Beta(value=V4_28_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder groupName(String groupName) Set the throughput control group name.- Parameters:
groupName
- The throughput control group name.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
setTargetThroughput
@Deprecated @Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder setTargetThroughput(int targetThroughput) Deprecated.Set the throughput control group target throughput. The target throughput value should be greater than 0.- Parameters:
targetThroughput
- The target throughput for the control group.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
targetThroughput
@Beta(value=V4_28_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder targetThroughput(int targetThroughput) Set the throughput control group target throughput. The target throughput value should be greater than 0.- Parameters:
targetThroughput
- The target throughput for the control group.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
setTargetThroughputThreshold
@Deprecated @Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder setTargetThroughputThreshold(double targetThroughputThreshold) Deprecated.Set the throughput control group target throughput threshold. The target throughput threshold value should be between (0, 1].- Parameters:
targetThroughputThreshold
- The target throughput threshold for the control group.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
targetThroughputThreshold
@Beta(value=V4_28_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder targetThroughputThreshold(double targetThroughputThreshold) Set the throughput control group target throughput threshold. The target throughput threshold value should be between (0, 1].- Parameters:
targetThroughputThreshold
- The target throughput threshold for the control group.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
setDefault
@Deprecated @Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder setDefault(boolean aDefault) Deprecated.Set whether this throughput control group will be used by default. If set to true, requests without explicit override of the throughput control group will be routed to this group.- Parameters:
aDefault
- The flag to indicate whether the throughput control group will be used by default.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
defaultControlGroup
@Beta(value=V4_28_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder defaultControlGroup(boolean aDefault) Set whether this throughput control group will be used by default. If set to true, requests without explicit override of the throughput control group will be routed to this group.- Parameters:
aDefault
- The flag to indicate whether the throughput control group will be used by default.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
continueOnInitError
@Beta(value=V4_28_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfigBuilder continueOnInitError(boolean continueOnInitError) Set whether allow request to continue on original request flow if throughput control controller failed on initialization. If set to true, requests will be able to fall back to original request flow if throughput control controller failed on initialization.- Parameters:
continueOnInitError
- The flag to indicate whether request is allowed to fall back to original request flow.- Returns:
- The
ThroughputControlGroupConfigBuilder
.
-
build
@Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public ThroughputControlGroupConfig build()Validate the throughput configuration and create a new throughput control group config item.- Returns:
- A new
ThroughputControlGroupConfig
.
-