internal SlaveIdGenerator(IdType idType, long highId, Master master, Log log, RequestContextFactory requestContextFactory) { this.IdType = idType; this.HighestIdInUse = highId; this.Master = master; this.Log = log; this.RequestContextFactory = requestContextFactory; IdQueue = EMPTY_ID_RANGE_ITERATOR; }
internal virtual void StoreLocally(IdAllocation allocation) { HighId = allocation.HighestIdInUse; this.DefragCountConflict = allocation.DefragCount; this.IdQueue = allocation.IdRange.GetEnumerator(); }
private void StoreLocally(IdAllocation allocation) { HighId = allocation.HighestIdInUse + 1; // high id is certainly bigger than the highest id in use this._idQueue = RespectingHighId(allocation.IdRange).GetEnumerator(); }