Class FencedPublicationSweeper
Removes abandoned publication fences (inactive or expired for two leases), walking the fence index; nothing here depends on the state store's provider.
public sealed class FencedPublicationSweeper : BackgroundService, IHostedService, IDisposable
- Inheritance
-
FencedPublicationSweeper
- Implements
- Inherited Members
Constructors
FencedPublicationSweeper(IServiceProvider, ILogger<FencedPublicationSweeper>)
Removes abandoned publication fences (inactive or expired for two leases), walking the fence index; nothing here depends on the state store's provider.
public FencedPublicationSweeper(IServiceProvider services, ILogger<FencedPublicationSweeper> logger)
Parameters
servicesIServiceProviderloggerILogger<FencedPublicationSweeper>
Methods
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.