Class TeamMailKeysEntity
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
-
PersistableEntityBaseEntityBase<ObjectId>EntityBaseTeamMailKeysEntity
- Implements
-
IEquatable<PersistableEntityBase>IEntity<ObjectId>IEquatable<EntityBase>
- Inherited Members
-
EntityBase.ToString()EntityBase.GetHashCode()EntityBase.Equals(EntityBase<ObjectId>)EntityBase.Equals(EntityBase)EntityBase.<Clone>$()EntityBase.EqualityContractEntityBase<ObjectId>.Equals(PersistableEntityBase)EntityBase<ObjectId>.IdPersistableEntityBase.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
Revision
Raised by every change, and required unchanged by the next, so concurrent rotations cannot both apply.
public int Revision { get; init; }
Property Value
TeamKey
public required string TeamKey { get; init; }