Table of Contents

Class FencedPublicationSweeper

Namespace
Virtufin.Api.Services
Assembly
Virtufin.Api.dll

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

services IServiceProvider
logger ILogger<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

stoppingToken CancellationToken

Triggered when StopAsync(CancellationToken) is called.

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.