C# Class Foundatio.Repositories.Elasticsearch.Jobs.CleanupIndexesJob

Inheritance: IJob
Mostrar archivo Open project: exceptionless/Foundatio.Repositories

Public Methods

Method Description
CleanupIndexesJob ( IElasticClient client, ILoggerFactory loggerFactory ) : System
RunAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Protected Methods

Method Description
AddIndex ( System.TimeSpan maxAge, DateTime?>.Func getAge ) : void
AddIndex ( string prefix, System.TimeSpan maxAge ) : void

Private Methods

Method Description
DeleteOldIndexesAsync ( ) : Task
GetIndexDate ( string name ) : IndexDate

Method Details

AddIndex() protected method

protected AddIndex ( System.TimeSpan maxAge, DateTime?>.Func getAge ) : void
maxAge System.TimeSpan
getAge DateTime?>.Func
return void

AddIndex() protected method

protected AddIndex ( string prefix, System.TimeSpan maxAge ) : void
prefix string
maxAge System.TimeSpan
return void

CleanupIndexesJob() public method

public CleanupIndexesJob ( IElasticClient client, ILoggerFactory loggerFactory ) : System
client IElasticClient
loggerFactory ILoggerFactory
return System

RunAsync() public method

public RunAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken System.Threading.CancellationToken
return Task