Skip to content

Commit 1118878

Browse files
Making priority level as GA contract
1 parent a436c32 commit 1118878

File tree

5 files changed

+63
-20
lines changed

5 files changed

+63
-20
lines changed

Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,7 @@ public ConnectionMode ConnectionMode
288288
/// If <see cref="AllowBulkExecution"/> is set to true in CosmosClientOptions, priority level set on the CosmosClient is used.
289289
/// </remarks>
290290
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>
291-
#if PREVIEW
292-
public
293-
#else
294-
internal
295-
#endif
296-
PriorityLevel? PriorityLevel { get; set; }
291+
public PriorityLevel? PriorityLevel { get; set; }
297292

298293
/// <summary>
299294
/// Gets or sets the maximum number of retries in the case where the request fails

Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ private void SetPriorityLevel(RequestMessage requestMessage)
444444
{
445445
Cosmos.PriorityLevel? priorityLevel = this.RequestedClientPriorityLevel;
446446
RequestOptions promotedRequestOptions = requestMessage.RequestOptions;
447-
if (promotedRequestOptions?.PriorityLevel.HasValue)
447+
if (promotedRequestOptions?.PriorityLevel.HasValue == true)
448448
{
449449
priorityLevel = promotedRequestOptions.PriorityLevel.Value;
450450
}

Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ public class RequestOptions
5656
/// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads.
5757
/// </remarks>
5858
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>
59-
#if PREVIEW
60-
public
61-
#else
62-
internal
63-
#endif
64-
PriorityLevel? PriorityLevel { get; set; }
59+
public PriorityLevel? PriorityLevel { get; set; }
6560

6661
/// <summary>
6762
/// Threshold values for Distributed Tracing.

Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ namespace Microsoft.Azure.Cosmos
1818
/// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads.
1919
/// </remarks>
2020
/// <seealso href="https://aka.ms/CosmosDB/PriorityBasedExecution"/>
21-
22-
#if PREVIEW
23-
public
24-
#else
25-
internal
26-
#endif
27-
enum PriorityLevel
21+
public enum PriorityLevel
2822
{
2923
/// <summary>
3024
/// High Priority

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,6 +2854,18 @@
28542854
"Attributes": [],
28552855
"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;"
28562856
},
2857+
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
2858+
"Type": "Method",
2859+
"Attributes": [
2860+
"CompilerGeneratedAttribute"
2861+
],
2862+
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
2863+
},
2864+
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel": {
2865+
"Type": "Property",
2866+
"Attributes": [],
2867+
"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;"
2868+
},
28572869
"System.Nullable`1[System.Boolean] EnableContentResponseOnWrite": {
28582870
"Type": "Property",
28592871
"Attributes": [],
@@ -3096,6 +3108,13 @@
30963108
"Attributes": [],
30973109
"MethodInfo": "Void set_PortReuseMode(System.Nullable`1[Microsoft.Azure.Cosmos.PortReuseMode]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
30983110
},
3111+
"Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
3112+
"Type": "Method",
3113+
"Attributes": [
3114+
"CompilerGeneratedAttribute"
3115+
],
3116+
"MethodInfo": "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
3117+
},
30993118
"Void set_RequestTimeout(System.TimeSpan)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
31003119
"Type": "Method",
31013120
"Attributes": [
@@ -6396,6 +6415,27 @@
63966415
},
63976416
"NestedTypes": {}
63986417
},
6418+
"Microsoft.Azure.Cosmos.PriorityLevel;System.Enum;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:True;IsClass:False;IsValueType:True;IsNested:False;IsGenericType:False;IsSerializable:True": {
6419+
"Subclasses": {},
6420+
"Members": {
6421+
"Int32 value__": {
6422+
"Type": "Field",
6423+
"Attributes": [],
6424+
"MethodInfo": "Int32 value__;IsInitOnly:False;IsStatic:False;"
6425+
},
6426+
"Microsoft.Azure.Cosmos.PriorityLevel High": {
6427+
"Type": "Field",
6428+
"Attributes": [],
6429+
"MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel High;IsInitOnly:False;IsStatic:True;"
6430+
},
6431+
"Microsoft.Azure.Cosmos.PriorityLevel Low": {
6432+
"Type": "Field",
6433+
"Attributes": [],
6434+
"MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel Low;IsInitOnly:False;IsStatic:True;"
6435+
}
6436+
},
6437+
"NestedTypes": {}
6438+
},
63996439
"Microsoft.Azure.Cosmos.QueryDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": {
64006440
"Subclasses": {},
64016441
"Members": {
@@ -8046,6 +8086,18 @@
80468086
],
80478087
"MethodInfo": "System.Collections.Generic.List`1[System.String] get_ExcludeRegions();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
80488088
},
8089+
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
8090+
"Type": "Method",
8091+
"Attributes": [
8092+
"CompilerGeneratedAttribute"
8093+
],
8094+
"MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
8095+
},
8096+
"System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel": {
8097+
"Type": "Property",
8098+
"Attributes": [],
8099+
"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;"
8100+
},
80498101
"System.String get_IfMatchEtag()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
80508102
"Type": "Method",
80518103
"Attributes": [
@@ -8110,6 +8162,13 @@
81108162
],
81118163
"MethodInfo": "Void set_IfNoneMatchEtag(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
81128164
},
8165+
"Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
8166+
"Type": "Method",
8167+
"Attributes": [
8168+
"CompilerGeneratedAttribute"
8169+
],
8170+
"MethodInfo": "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
8171+
},
81138172
"Void set_Properties(System.Collections.Generic.IReadOnlyDictionary`2[System.String,System.Object])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": {
81148173
"Type": "Method",
81158174
"Attributes": [

0 commit comments

Comments
 (0)