// Token: 0x0600003B RID: 59 RVA: 0x00002A84 File Offset: 0x00000C84 protected override AnchorJobProcessorResult ProcessEntry(CacheEntryBase cacheEntry) { MigrationOccupantType migrationOccupantType = MigrationOccupantType.Regular; try { migrationOccupantType = base.Context.Config.GetConfig <MigrationOccupantType>("OccupantTypes"); } catch (ConfigurationSettingsException ex) { this.LogFailure(ex); return(AnchorJobProcessorResult.Waiting); } base.Context.Logger.Log(MigrationEventType.Verbose, "Entered ProcessEntry, working on types '{0}'", new object[] { migrationOccupantType }); bool flag = false; foreach (MigrationOccupantType migrationOccupantType2 in from t in migrationOccupantType.ToString().Split(new char[] { ',' }) select(MigrationOccupantType) Enum.Parse(typeof(MigrationOccupantType), t)) { base.Context.Logger.Log(MigrationEventType.Verbose, "working on type {0}", new object[] { migrationOccupantType2 }); BatchCreatorScheduler.OccupantCreator occupantCreator; if (!this.OccupantCreators.TryGetValue(migrationOccupantType2, out occupantCreator)) { base.Context.Logger.Log(MigrationEventType.Information, "Creating a creator to work on {0}", new object[] { migrationOccupantType2 }); occupantCreator = new BatchCreatorScheduler.OccupantCreator(migrationOccupantType2); this.OccupantCreators.Add(migrationOccupantType2, occupantCreator); } using (occupantCreator.ActivateContext(base.Context)) { try { if (this.ShouldCreate(occupantCreator.LastRun)) { IList <MailboxId> migrationMailboxes = this.GetMigrationMailboxes(cacheEntry.ADProvider); base.Context.Logger.Log(MigrationEventType.Verbose, "Found {0} active migration mailboxes to run batches", new object[] { migrationMailboxes.Count }); if (migrationMailboxes.Count <= 0) { base.Context.Logger.Log(MigrationEventType.Warning, "No active migration mailboxes to run batches", new object[0]); } else { BatchCapacityDatum batchCapacityForForest = this.LoadBalanceClient.GetBatchCapacityForForest(base.Context.Config.GetConfig <int>("MailboxRunLimit")); base.Context.Logger.Log(MigrationEventType.Verbose, "Load balancer allowed us to create {0} mailboxes", new object[] { batchCapacityForForest.MaximumNumberOfMailboxes }); long maximumAccounts = (long)batchCapacityForForest.MaximumNumberOfMailboxes; int? config = base.Context.Config.GetConfig <int?>("MaximumTotalMailboxSize"); MigrationAccount[] array = this.SelectAccountsToMigrate(maximumAccounts, (config != null) ? new long?((long)config.GetValueOrDefault()) : null, base.Context.Config.GetConfig <int?>("ConstraintId")); flag = (array.Length > 0); int index = 0; foreach (List <MigrationAccount> list in this.CreateSubBatches <MigrationAccount>(array, migrationMailboxes.Count)) { base.Context.Logger.Log(MigrationEventType.Verbose, "Creating migration batch of size {0} for migration mailbox id {1}", new object[] { list.Count, migrationMailboxes[index] }); this.CreateMigrationBatch(migrationMailboxes[index++], this.CreateCsv(list)); } } } } catch (ConfigurationSettingsException ex2) { this.LogFailure(ex2); } catch (MigrationPermanentException ex3) { this.LogFailure(ex3); } catch (BatchCreatorException ex4) { this.LogFailure(ex4); } } } if (!flag) { return(AnchorJobProcessorResult.Waiting); } return(AnchorJobProcessorResult.Working); }
// Token: 0x06000056 RID: 86 RVA: 0x000037A5 File Offset: 0x000019A5 public OccupantLogContext(MigrationOccupantType occupantType) { this.SummaryName = occupantType.ToString(); }
// Token: 0x0600005A RID: 90 RVA: 0x000038BA File Offset: 0x00001ABA public OccupantCreator(MigrationOccupantType occupantType) { this.OccupantType = occupantType; this.LastRun = DateTime.MinValue; }
// Token: 0x0600004F RID: 79 RVA: 0x000036F0 File Offset: 0x000018F0 public OccupantContext(AnchorContext context, MigrationOccupantType occupantType) { this.LogContext = new BatchCreatorScheduler.OccupantContext.OccupantLogContext(occupantType); this.ConfigContext = new GenericSettingsContext("MigrationOccupantType", occupantType.ToString(), null).Activate(); AnchorLogContext.Current.SetSummarizable(this.LogContext); }