Class SupportEventLedgerCollection
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
-
RepositoryCollectionBaseDiskRepositoryCollectionBase<SupportEventLedgerEntity>SupportEventLedgerCollection
- Implements
-
IDiskRepositoryCollection<SupportEventLedgerEntity>IRepositoryCollectionIReadOnlyRepositoryCollection
- 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>.FetchSizeRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._mongoDbServiceFactoryRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._loggerRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._databaseContextRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>._mongoDbServiceRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.InitAsync(IMongoCollection<SupportEventLedgerEntity>)RepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ProtectedCollectionNameRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CollectionNameRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.DatabasePartRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.ConfigurationNameRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.AutoCleanRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CleanOnStartupRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CreateCollectionStrategyRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.IndicesRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.CoreIndicesRepositoryCollectionBase<SupportEventLedgerEntity, ObjectId>.TypesRepositoryCollectionBase.ConfigurationNameRepositoryCollectionBase.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
mongoDbServiceFactoryIMongoDbServiceFactoryloggerILogger<SupportEventLedgerCollection>optionsIOptions<ThargaTeamOptions>
Properties
CollectionName
public override string CollectionName { get; }
Property Value
Indices
public override IEnumerable<CreateIndexModel<SupportEventLedgerEntity>> Indices { get; }
Property Value
- IEnumerable<CreateIndexModel<SupportEventLedgerEntity>>