你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CosmosConfig.CosmosConfigBuilder Class

  • java.lang.Object
    • com.azure.spring.data.cosmos.config.CosmosConfig.CosmosConfigBuilder

public static class CosmosConfig.CosmosConfigBuilder

Builder class for cosmos config

Method Summary

Modifier and Type Method and Description
CosmosConfig build()

Build a CosmosConfig instance

CosmosConfigBuilder enableDatabaseThroughput(boolean autoscale, int requestUnits)

Enable database throughput

CosmosConfigBuilder enableIndexMetrics(boolean indexMetricsEnabled)

Set indexMetricsEnabled

CosmosConfigBuilder enableQueryMetrics(boolean queryMetricsEnabled)

Set queryMetricsEnabled

CosmosConfigBuilder maxBufferedItemCount(int maxBufferedItemCount)

Set maxBufferedItemCount

CosmosConfigBuilder maxDegreeOfParallelism(int maxDegreeOfParallelism)

Set maxDegreeOfParallelism

CosmosConfigBuilder responseContinuationTokenLimitInKb(int responseContinuationTokenLimitInKb)

Set responseContinuationTokenLimitInKb

CosmosConfigBuilder responseDiagnosticsProcessor(ResponseDiagnosticsProcessor responseDiagnosticsProcessor)

Set responseDiagnosticsProcessor

String toString()

Methods inherited from java.lang.Object

Method Details

build

public CosmosConfig build()

Build a CosmosConfig instance

Returns:

CosmosConfig

enableDatabaseThroughput

public CosmosConfig.CosmosConfigBuilder enableDatabaseThroughput(boolean autoscale, int requestUnits)

Enable database throughput

Parameters:

autoscale - Autoscaling
requestUnits - Request units

Returns:

CosmosConfigBuilder

enableIndexMetrics

public CosmosConfig.CosmosConfigBuilder enableIndexMetrics(boolean indexMetricsEnabled)

Set indexMetricsEnabled

Parameters:

indexMetricsEnabled - value to initialize

Returns:

CosmosConfigBuilder

enableQueryMetrics

public CosmosConfig.CosmosConfigBuilder enableQueryMetrics(boolean queryMetricsEnabled)

Set queryMetricsEnabled

Parameters:

queryMetricsEnabled - value to initialize

Returns:

CosmosConfigBuilder

maxBufferedItemCount

public CosmosConfig.CosmosConfigBuilder maxBufferedItemCount(int maxBufferedItemCount)

Set maxBufferedItemCount

Parameters:

maxBufferedItemCount - value to initialize

Returns:

CosmosConfigBuilder

maxDegreeOfParallelism

public CosmosConfig.CosmosConfigBuilder maxDegreeOfParallelism(int maxDegreeOfParallelism)

Set maxDegreeOfParallelism

Parameters:

maxDegreeOfParallelism - value to initialize

Returns:

CosmosConfigBuilder

responseContinuationTokenLimitInKb

public CosmosConfig.CosmosConfigBuilder responseContinuationTokenLimitInKb(int responseContinuationTokenLimitInKb)

Set responseContinuationTokenLimitInKb

Parameters:

responseContinuationTokenLimitInKb - value to initialize

Returns:

CosmosConfigBuilder

responseDiagnosticsProcessor

public CosmosConfig.CosmosConfigBuilder responseDiagnosticsProcessor(ResponseDiagnosticsProcessor responseDiagnosticsProcessor)

Set responseDiagnosticsProcessor

Parameters:

responseDiagnosticsProcessor - value to initialize

Returns:

CosmosConfigBuilder

toString

public String toString()

Overrides:

CosmosConfig.CosmosConfigBuilder.toString()

Applies to