Share via


ThroughputControlGroupConfigBuilder Class

  • java.lang.Object
    • com.azure.cosmos.ThroughputControlGroupConfigBuilder

public class ThroughputControlGroupConfigBuilder

The throughput control group config builder.

Constructor Summary

Constructor Description
ThroughputControlGroupConfigBuilder()

Method Summary

Modifier and Type Method and Description
ThroughputControlGroupConfig build()

Validate the throughput configuration and create a new throughput control group config item.

ThroughputControlGroupConfigBuilder continueOnInitError(boolean continueOnInitError)

Set whether allow request to continue on original request flow if throughput control controller failed on initialization.

ThroughputControlGroupConfigBuilder defaultControlGroup(boolean aDefault)

Set whether this throughput control group will be used by default.

ThroughputControlGroupConfigBuilder groupName(String groupName)

Set the throughput control group name.

ThroughputControlGroupConfigBuilder priorityLevel(PriorityLevel priorityLevel)

Set the throughput control group priority level.

ThroughputControlGroupConfigBuilder setDefault(boolean aDefault)

Set whether this throughput control group will be used by default.

ThroughputControlGroupConfigBuilder setGroupName(String groupName)

Set the throughput control group name.

ThroughputControlGroupConfigBuilder setTargetThroughput(int targetThroughput)

Set the throughput control group target throughput.

ThroughputControlGroupConfigBuilder setTargetThroughputThreshold(double targetThroughputThreshold)

Set the throughput control group target throughput threshold.

ThroughputControlGroupConfigBuilder targetThroughput(int targetThroughput)

Set the throughput control group target throughput.

ThroughputControlGroupConfigBuilder targetThroughputThreshold(double targetThroughputThreshold)

Set the throughput control group target throughput threshold.

ThroughputControlGroupConfigBuilder throughputBucket(int throughputBucket)

Set the throughput bucket of the group.

Methods inherited from java.lang.Object

Constructor Details

ThroughputControlGroupConfigBuilder

public ThroughputControlGroupConfigBuilder()

Method Details

build

public ThroughputControlGroupConfig build()

Validate the throughput configuration and create a new throughput control group config item.

Returns:

continueOnInitError

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:

defaultControlGroup

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:

groupName

public ThroughputControlGroupConfigBuilder groupName(String groupName)

Set the throughput control group name.

Parameters:

groupName - The throughput control group name.

Returns:

priorityLevel

public ThroughputControlGroupConfigBuilder priorityLevel(PriorityLevel 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:

setDefault

@Deprecated
public ThroughputControlGroupConfigBuilder setDefault(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:

setGroupName

@Deprecated
public ThroughputControlGroupConfigBuilder setGroupName(String groupName)

Set the throughput control group name.

Parameters:

groupName - The throughput control group name.

Returns:

setTargetThroughput

@Deprecated
public ThroughputControlGroupConfigBuilder setTargetThroughput(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:

setTargetThroughputThreshold

@Deprecated
public ThroughputControlGroupConfigBuilder setTargetThroughputThreshold(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:

targetThroughput

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:

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:

throughputBucket

public ThroughputControlGroupConfigBuilder throughputBucket(int throughputBucket)

Set the throughput bucket of the group.

For more information about throughput bucket please visit Throughput buckets in Azure Cosmos DB

Parameters:

throughputBucket - the throughput bucket id.

Returns:

Applies to