Table of Contents

Class SupportEventLedgerCollection

Namespace
Tharga.Team.MongoDB
Assembly
Tharga.Team.MongoDB.dll

Collection of handled inbound events. Default collection name SupportEventLedger.

public class SupportEventLedgerCollection : DiskRepositoryCollectionBase<SupportEventLedgerEntity>, ISupportEventLedgerCollection, IDiskRepositoryCollection<SupportEventLedgerEntity>, IDiskRepositoryCollection<SupportEventLedgerEntity, ObjectId>, IRepositoryCollection<SupportEventLedgerEntity, ObjectId>, IReadOnlyRepositoryCollection<SupportEventLedgerEntity, ObjectId>, IRepositoryCollection, IReadOnlyRepositoryCollection
Inheritance
RepositoryCollectionBase
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>
DiskRepositoryCollectionBase<SupportEventLedgerEntity>
SupportEventLedgerCollection
Implements
IDiskRepositoryCollection<SupportEventLedgerEntity>
IDiskRepositoryCollection<SupportEventLedgerEntity, ObjectId>
IRepositoryCollection<SupportEventLedgerEntity, ObjectId>
IReadOnlyRepositoryCollection<SupportEventLedgerEntity, ObjectId>
IRepositoryCollection
IReadOnlyRepositoryCollection
Inherited Members
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.AddAsync(SupportEventLedgerEntity, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.TryAddAsync(SupportEventLedgerEntity, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.AddOrReplaceAsync(SupportEventLedgerEntity, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ReplaceOneAsync(SupportEventLedgerEntity, OneOption<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ReplaceOneAsync(SupportEventLedgerEntity, FilterDefinition<SupportEventLedgerEntity>, OneOption<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.UpdateOneAsync(ObjectId, UpdateDefinition<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.UpdateOneAsync(FilterDefinition<SupportEventLedgerEntity>, UpdateDefinition<SupportEventLedgerEntity>, OneOption<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.UpdateManyAsync(FilterDefinition<SupportEventLedgerEntity>, UpdateDefinition<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DeleteOneAsync(ObjectId, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DeleteOneAsync(FilterDefinition<SupportEventLedgerEntity>, OneOption<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DeleteManyAsync(FilterDefinition<SupportEventLedgerEntity>, IClientSessionHandle)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.GetCollection()
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DropCollectionAsync()
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.GetDirtyAsync()
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.GetFailedIndices()
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DropEmptyAsync(IMongoCollection<SupportEventLedgerEntity>)
DiskRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.FetchSize
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._mongoDbServiceFactory
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._logger
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._databaseContext
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._mongoDbService
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.InitAsync(IMongoCollection<SupportEventLedgerEntity>)
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ProtectedCollectionName
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CollectionName
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DatabasePart
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ConfigurationName
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.AutoClean
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CleanOnStartup
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CreateCollectionStrategy
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.Indices
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CoreIndices
RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.Types
RepositoryCollectionBase.ConfigurationName
RepositoryCollectionBase.ActionEvent

Remarks

The unique index is the deduplication mechanism, not an optimisation. It is what makes recording an event atomic across instances: two instances handed the same retry both attempt the insert, and exactly one succeeds. A read-then-write would let both through at the moment it matters most.

The TTL index expires entries after the retention window, because a ledger that grows forever to guard against retries that stopped an hour ago is pure cost.

Constructors

SupportEventLedgerCollection(IMongoDbServiceFactory, ILogger<SupportEventLedgerCollection>, IOptions<ThargaTeamOptions>)

public SupportEventLedgerCollection(IMongoDbServiceFactory mongoDbServiceFactory, ILogger<SupportEventLedgerCollection> logger, IOptions<ThargaTeamOptions> options = null)

Parameters

mongoDbServiceFactory IMongoDbServiceFactory
logger ILogger<SupportEventLedgerCollection>
options IOptions<ThargaTeamOptions>

Properties

CollectionName

public override string CollectionName { get; }

Property Value

string

Indices

public override IEnumerable<CreateIndexModel<SupportEventLedgerEntity>> Indices { get; }

Property Value

IEnumerable<CreateIndexModel<SupportEventLedgerEntity>>