Skip to content

Commit 7be150c

Browse files
InMemoryLeaseContainer: Adds public API to use InMemoryLeaseContainer with ChangeFeedProcessorBuilder (#5182)
Enabling using InMemoryLeaseContainer as public contract. **LIMITATIONS: Estimator API is not supported with InMemoryLeaseContainer.** ```C# public class ChangeFeedProcessorBuilder { public virtual ChangeFeedProcessorBuilder WithInMemoryLeaseContainer(); } ``` Usage ```C# ChangeFeedProcessor processor = this.Container .GetChangeFeedProcessorBuilder(...) .WithInstanceName("...") .WithInMemoryLeaseContainer() .Build(); ``` ## Type of change Please delete options that are not relevant. - [] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [] This change requires a documentation update ## Closing issues To automatically close an issue: closes #5177 --------- Co-authored-by: Debdatta Kunda <[email protected]>
1 parent f07e797 commit 7be150c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedProcessorBuilder.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,11 @@ public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer)
213213

214214
/// <summary>
215215
/// Uses an in-memory container to maintain state of the leases
216-
/// </summary>
217-
/// <remarks>
216+
///
218217
/// Using an in-memory container restricts the scaling capability to just the instance running the current processor.
219-
/// </remarks>
218+
/// </summary>
220219
/// <returns>The instance of <see cref="ChangeFeedProcessorBuilder"/> to use.</returns>
221-
internal virtual ChangeFeedProcessorBuilder WithInMemoryLeaseContainer()
220+
public virtual ChangeFeedProcessorBuilder WithInMemoryLeaseContainer()
222221
{
223222
if (this.leaseContainer != null)
224223
{

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@
370370
"Attributes": [],
371371
"MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder WithErrorNotification(ChangeFeedMonitorErrorDelegate);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
372372
},
373+
"Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder WithInMemoryLeaseContainer()": {
374+
"Type": "Method",
375+
"Attributes": [],
376+
"MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder WithInMemoryLeaseContainer();IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;"
377+
},
373378
"Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder WithInstanceName(System.String)": {
374379
"Type": "Method",
375380
"Attributes": [],

0 commit comments

Comments
 (0)