Package com.azure.cosmos
Class ThroughputControlGroupConfigBuilder
java.lang.Object
com.azure.cosmos.ThroughputControlGroupConfigBuilder
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.priorityLevel
(PriorityLevel priorityLevel) Set the throughput control group priority level.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
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
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
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
.
-
priorityLevel
Set the throughput control group priority level. The priority level is used to determine which requests will be throttled first when the total throughput of all control groups exceeds the max throughput. By Default PriorityLevel for each request is treated as High. It can be explicitly set to Low for some requests. Priority based execution is currently in preview. To enable the feature, please follow the instructions here- Parameters:
priorityLevel
- The priority level 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
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
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
Validate the throughput configuration and create a new throughput control group config item.- Returns:
- A new
ThroughputControlGroupConfig
.
-