Exemple #1
0
 // Token: 0x060003B7 RID: 951 RVA: 0x0001A60B File Offset: 0x0001880B
 public ElcTagSubAssistant(DatabaseInfo databaseInfo, ELCAssistantType elcAssistantType, ELCHealthMonitor healthMonitor) : base(databaseInfo, healthMonitor)
 {
     base.ElcAssistantType   = elcAssistantType;
     this.tagProvisioner     = new TagProvisioner(this);
     this.tagEnforcerManager = new TagEnforcerManager(this);
     this.ReadCalendarTaskMRMRegKeys();
 }
 // Token: 0x060002C0 RID: 704 RVA: 0x000109A4 File Offset: 0x0000EBA4
 public ElcFolderSubAssistant(DatabaseInfo databaseInfo, ELCAssistantType elcAssistantType, ELCHealthMonitor healthMonitor) : base(databaseInfo, healthMonitor)
 {
     base.ElcAssistantType  = elcAssistantType;
     this.elcAuditLog       = new ElcAuditLog(databaseInfo);
     this.folderProvisioner = new FolderProvisioner(databaseInfo, this.elcAuditLog, this);
     this.enforcerManager   = new EnforcerManager(databaseInfo, this.elcAuditLog, this);
 }
Exemple #3
0
 // Token: 0x0600027C RID: 636 RVA: 0x0000EEC4 File Offset: 0x0000D0C4
 public ElcSubAssistant(DatabaseInfo databaseInfo, ELCHealthMonitor healthMonitor)
 {
     this.databaseInfo  = databaseInfo;
     this.healthMonitor = healthMonitor;
 }
Exemple #4
0
 // Token: 0x06000629 RID: 1577 RVA: 0x0002F6D6 File Offset: 0x0002D8D6
 public SysCleanupSubAssistant(DatabaseInfo databaseInfo, ELCAssistantType elcAssistantType, ELCHealthMonitor healthMonitor) : base(databaseInfo, healthMonitor)
 {
     base.ElcAssistantType          = elcAssistantType;
     this.sysCleanupEnforcerManager = new SysCleanupEnforcerManager(this);
 }
        // Token: 0x0600050E RID: 1294 RVA: 0x00026080 File Offset: 0x00024280
        private void ExpireInBatches(List <ItemData> listToSend, Folder sourceFolder, Folder targetFolder, ElcSubAssistant elcSubAssistant, ExpirationExecutor.Action retentionActionType, int totalFailuresSoFar, ref List <Exception> allExceptionsSoFar, out List <string> foldersWithErrors, out int newMoveErrorsTotal)
        {
            int             count           = listToSend.Count;
            int             num             = 0;
            int             i               = 0;
            int             num2            = 0;
            int             num3            = 0;
            long            num4            = 0L;
            int             num5            = 0;
            int             num6            = 0;
            int             num7            = 0;
            int             num8            = 0;
            OperationResult operationResult = OperationResult.Succeeded;
            Exception       ex              = null;

            ItemData[] sourceArray = listToSend.ToArray();
            foldersWithErrors  = new List <string>();
            newMoveErrorsTotal = 0;
            try
            {
                while (i < count)
                {
                    elcSubAssistant.ThrottleStoreCallAndCheckForShutdown(this.archiveMailboxSession.MailboxOwner, ELCHealthMonitor.GetArchiveResourceHealthMonitorKeys(this.archiveMailboxSession, this.primaryMailboxSession));
                    num2 = ((count - i >= 100) ? 100 : (count - i));
                    List <VersionedId> list;
                    bool flag;
                    int  num9;
                    Dictionary <ItemData.EnforcerType, int> dictionary;
                    num4 += (long)LocalArchiveProcessor.CopyIdsToTmpArray(sourceArray, i, num2, this.MaxMessageSizeInArchive, out list, out flag, out num9, out dictionary);
                    num7 += num9;
                    num3  = list.Count;
                    if (flag)
                    {
                        foldersWithErrors.Add(sourceFolder.DisplayName);
                        LocalArchiveProcessor.Tracer.TraceDebug <LocalArchiveProcessor, string>((long)this.GetHashCode(), "{0}: Added folder {1} to the list of bad folders to be event logged.", this, sourceFolder.DisplayName);
                    }
                    if (num3 > 0)
                    {
                        GroupOperationResult groupOperationResult = sourceFolder.CopyItems(this.archiveMailboxSession, targetFolder.Id, list.ToArray());
                        if (groupOperationResult.OperationResult == OperationResult.Succeeded)
                        {
                            LocalArchiveProcessor.Tracer.TraceDebug <LocalArchiveProcessor, int>((long)this.GetHashCode(), "{0}: Copied to archive batch of {1} items. Will proceed to hard delete the batch.", this, num3);
                            try
                            {
                                this.primaryMailboxSession.COWSettings.TemporaryDisableHold = true;
                                AggregateOperationResult aggregateOperationResult = this.primaryMailboxSession.Delete(DeleteItemFlags.HardDelete | DeleteItemFlags.SuppressReadReceipt, list.ToArray());
                                operationResult = aggregateOperationResult.OperationResult;
                                ex = ElcExceptionHelper.ExtractExceptionsFromAggregateOperationResult(aggregateOperationResult);
                                goto IL_18E;
                            }
                            finally
                            {
                                this.primaryMailboxSession.COWSettings.TemporaryDisableHold = false;
                            }
                        }
                        operationResult = groupOperationResult.OperationResult;
                        ex = groupOperationResult.Exception;
                    }
                    else
                    {
                        LocalArchiveProcessor.Tracer.TraceDebug <LocalArchiveProcessor>((long)this.GetHashCode(), "{0}: The tmpList was empty during this loop. Nothing to send, don't do anything.", this);
                    }
IL_18E:
                    i   += num2;
                    num += num3;
                    if (operationResult == OperationResult.Failed || operationResult == OperationResult.PartiallySucceeded)
                    {
                        LocalArchiveProcessor.Tracer.TraceError((long)this.GetHashCode(), "{0}: An error occured when trying to expire a batch of {1} items. Expiration action is {2}. Result: {3}", new object[]
                        {
                            this,
                            num3,
                            retentionActionType.ToString(),
                            operationResult
                        });
                        Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_ExpirationOfCurrentBatchFailed, null, new object[]
                        {
                            this.primaryMailboxSession.MailboxOwner,
                            retentionActionType.ToString(),
                            (sourceFolder == null) ? string.Empty : sourceFolder.DisplayName,
                            (targetFolder == null) ? string.Empty : targetFolder.DisplayName,
                            (sourceFolder == null) ? string.Empty : sourceFolder.Id.ObjectId.ToHexEntryId(),
                            (targetFolder == null) ? string.Empty : targetFolder.Id.ObjectId.ToHexEntryId(),
                            (ex == null) ? string.Empty : ex.ToString()
                        });
                        newMoveErrorsTotal++;
                        num8++;
                        if (ex != null)
                        {
                            allExceptionsSoFar.Add(ex);
                        }
                        if (totalFailuresSoFar + newMoveErrorsTotal > MailboxData.MaxErrorsAllowed)
                        {
                            throw new TransientMailboxException(Strings.descELCEnforcerTooManyErrors(this.primaryMailboxSession.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString(), MailboxData.MaxErrorsAllowed), new AggregateException(allExceptionsSoFar), null);
                        }
                    }
                    else
                    {
                        num5 += (dictionary.ContainsKey(ItemData.EnforcerType.DumpsterExpirationEnforcer) ? dictionary[ItemData.EnforcerType.DumpsterExpirationEnforcer] : 0);
                        num6 += (dictionary.ContainsKey(ItemData.EnforcerType.ExpirationTagEnforcer) ? dictionary[ItemData.EnforcerType.ExpirationTagEnforcer] : 0);
                    }
                }
            }
            finally
            {
                ELCPerfmon.TotalItemsExpired.IncrementBy((long)num);
                ELCPerfmon.TotalSizeItemsExpired.IncrementBy(num4);
                ELCPerfmon.TotalItemsMoved.IncrementBy((long)num);
                ELCPerfmon.TotalSizeItemsMoved.IncrementBy(num4);
                if (this.statisticsLogEntry != null)
                {
                    this.statisticsLogEntry.NumberOfItemsActuallyArchivedByDumpsterExpirationEnforcer += (long)num5;
                    this.statisticsLogEntry.NumberOfItemsActuallyArchivedByTag += (long)num6;
                    this.statisticsLogEntry.NumberOfItemsSkippedDueToSizeRestrictionInArchiveProcessor += (long)num7;
                    this.statisticsLogEntry.NumberOfBatchesFailedToMoveInArchiveProcessor += (long)num8;
                }
            }
        }