Table of Contents

Class TeamMailKeysEntity

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

Every mail key a team has held, in one document.

public record TeamMailKeysEntity : EntityBase, ISupportInitialize, IEquatable<PersistableEntityBase>, IEntity<ObjectId>, IEquatable<EntityBase<ObjectId>>, IEquatable<EntityBase>, IEquatable<TeamMailKeysEntity>
Inheritance
PersistableEntityBase
EntityBase<ObjectId>
EntityBase
TeamMailKeysEntity
Implements
IEquatable<PersistableEntityBase>
IEntity<ObjectId>
IEquatable<EntityBase<ObjectId>>
IEquatable<EntityBase>
Inherited Members
EntityBase.ToString()
EntityBase.GetHashCode()
EntityBase.Equals(EntityBase<ObjectId>)
EntityBase.Equals(EntityBase)
EntityBase.<Clone>$()
EntityBase.EqualityContract
EntityBase<ObjectId>.Equals(PersistableEntityBase)
EntityBase<ObjectId>.Id
PersistableEntityBase.NeedsCleaning()
PersistableEntityBase.BeginInit()
PersistableEntityBase.EndInit()
PersistableEntityBase.CatchAll

Remarks

One document per team, so a rotation is one write. Rotating touches three keys; a document of its own per key would need a transaction to keep them consistent, and a replica set to have one. Here the whole change is a single conditional update on Revision, which two instances cannot interleave.

Properties

Keys

public required TeamMailKeyEntry[] Keys { get; init; }

Property Value

TeamMailKeyEntry[]

Revision

Raised by every change, and required unchanged by the next, so concurrent rotations cannot both apply.

public int Revision { get; init; }

Property Value

int

TeamKey

public required string TeamKey { get; init; }

Property Value

string