Skip to content

Commit

Permalink
Making priority level as GA contract
Browse files Browse the repository at this point in the history
  • Loading branch information
kirankumarkolli committed Jan 30, 2024
1 parent a436c32 commit 1118878
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 20 deletions.
7 changes: 1 addition & 6 deletions Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,7 @@ public ConnectionMode ConnectionMode
/// If <see cref="AllowBulkExecution"/> is set to true in CosmosClientOptions, priority level set on the CosmosClient is used.
/// </remarks>
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>
#if PREVIEW
public
#else
internal
#endif
PriorityLevel? PriorityLevel { get; set; }
public PriorityLevel? PriorityLevel { get; set; }

/// <summary>
/// Gets or sets the maximum number of retries in the case where the request fails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ private void SetPriorityLevel(RequestMessage requestMessage)
{
Cosmos.PriorityLevel? priorityLevel = this.RequestedClientPriorityLevel;
RequestOptions promotedRequestOptions = requestMessage.RequestOptions;
if (promotedRequestOptions?.PriorityLevel.HasValue)
if (promotedRequestOptions?.PriorityLevel.HasValue == true)
{
priorityLevel = promotedRequestOptions.PriorityLevel.Value;
}
Expand Down
7 changes: 1 addition & 6 deletions Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@ public class RequestOptions
/// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads.
/// </remarks>
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>
#if PREVIEW
public
#else
internal
#endif
PriorityLevel? PriorityLevel { get; set; }
public PriorityLevel? PriorityLevel { get; set; }

/// <summary>
/// Threshold values for Distributed Tracing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@ namespace Microsoft.Azure.Cosmos
/// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads.
/// </remarks>
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>

#if PREVIEW
public
#else
internal
#endif
enum PriorityLevel
public enum PriorityLevel
{
/// <summary>
/// High Priority
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2854,6 +2854,18 @@
"Attributes": [],
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PortReuseMode] PortReuseMode;CanRead:True;CanWrite:True;System.Nullable`1[Microsoft.Azure.Cosmos.PortReuseMode] get_PortReuseMode();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PortReuseMode(System.Nullable`1[Microsoft.Azure.Cosmos.PortReuseMode]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
"CompilerGeneratedAttribute"
],
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel": {
"Type": "Property",
"Attributes": [],
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel;CanRead:True;CanWrite:True;System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Nullable`1[System.Boolean] EnableContentResponseOnWrite": {
"Type": "Property",
"Attributes": [],
Expand Down Expand Up @@ -3096,6 +3108,13 @@
"Attributes": [],
"MethodInfo": "Void set_PortReuseMode(System.Nullable`1[Microsoft.Azure.Cosmos.PortReuseMode]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
"CompilerGeneratedAttribute"
],
"MethodInfo": "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void set_RequestTimeout(System.TimeSpan)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
Expand Down Expand Up @@ -6396,6 +6415,27 @@
},
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.PriorityLevel;System.Enum;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:True;IsClass:False;IsValueType:True;IsNested:False;IsGenericType:False;IsSerializable:True": {
"Subclasses": {},
"Members": {
"Int32 value__": {
"Type": "Field",
"Attributes": [],
"MethodInfo": "Int32 value__;IsInitOnly:False;IsStatic:False;"
},
"Microsoft.Azure.Cosmos.PriorityLevel High": {
"Type": "Field",
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel High;IsInitOnly:False;IsStatic:True;"
},
"Microsoft.Azure.Cosmos.PriorityLevel Low": {
"Type": "Field",
"Attributes": [],
"MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel Low;IsInitOnly:False;IsStatic:True;"
}
},
"NestedTypes": {}
},
"Microsoft.Azure.Cosmos.QueryDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
"Subclasses": {},
"Members": {
Expand Down Expand Up @@ -8046,6 +8086,18 @@
],
"MethodInfo": "System.Collections.Generic.List`1[System.String] get_ExcludeRegions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
"CompilerGeneratedAttribute"
],
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel": {
"Type": "Property",
"Attributes": [],
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel;CanRead:True;CanWrite:True;System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"System.String get_IfMatchEtag()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
Expand Down Expand Up @@ -8110,6 +8162,13 @@
],
"MethodInfo": "Void set_IfNoneMatchEtag(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
"CompilerGeneratedAttribute"
],
"MethodInfo": "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
},
"Void set_Properties(System.Collections.Generic.IReadOnlyDictionary`2[System.String,System.Object])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
"Type": "Method",
"Attributes": [
Expand Down

0 comments on commit 1118878

Please sign in to comment.