예제 #1
0
        // Token: 0x06001200 RID: 4608 RVA: 0x00037AA4 File Offset: 0x00035CA4
        internal static ADObjectId FindDatabase(LogMessageDelegate logger)
        {
            LoadBalancingReport             loadBalancingReport             = null;
            MailboxDatabaseWithLocationInfo mailboxDatabaseWithLocationInfo = PhysicalResourceLoadBalancing.FindDatabaseAndLocation(null, logger, null, true, false, null, ref loadBalancingReport);

            if (mailboxDatabaseWithLocationInfo != null)
            {
                return(mailboxDatabaseWithLocationInfo.MailboxDatabase.Id);
            }
            return(null);
        }
예제 #2
0
        // Token: 0x06001206 RID: 4614 RVA: 0x00037DC8 File Offset: 0x00035FC8
        internal static MailboxDatabaseWithLocationInfo FindDatabaseAndLocation(string domainController, LogMessageDelegate logger, ScopeSet scopeSet, bool isInitialProvisioning, bool localSiteDatabasesOnly, int?qualifiedMinServerVersion, IMailboxProvisioningConstraint mailboxProvisioningConstraint, IEnumerable <ADObjectId> excludedDatabaseIds, ref LoadBalancingReport loadBalancingReport)
        {
            ITopologyConfigurationSession configSession = PhysicalResourceLoadBalancing.CreateGlobalConfigSession(domainController);
            List <MailboxDatabase>        databasesForProvisioningCached = PhysicalResourceLoadBalancing.GetDatabasesForProvisioningCached(configSession, localSiteDatabasesOnly, logger);
            List <MailboxDatabase>        list;

            if (mailboxProvisioningConstraint != null || excludedDatabaseIds != null)
            {
                list = PhysicalResourceLoadBalancing.FilterEligibleDatabase(logger, databasesForProvisioningCached.GetRange(0, databasesForProvisioningCached.Count), mailboxProvisioningConstraint, excludedDatabaseIds);
            }
            else
            {
                list = databasesForProvisioningCached.GetRange(0, databasesForProvisioningCached.Count);
            }
            if (list.Count == 0)
            {
                PhysicalResourceLoadBalancing.LogVerbose(Strings.VerboseLbNoAvailableDatabase, logger);
                return(null);
            }
            LoadBalancingReport loadBalancingReport2 = loadBalancingReport ?? new LoadBalancingReport();

            loadBalancingReport2.enabledDatabasesWithLocalCopyCount = list.Count;
            ActiveManager cachingActiveManagerInstance = ActiveManager.GetCachingActiveManagerInstance();

            if (PhysicalResourceLoadBalancing.IsDatacenter)
            {
                return(PhysicalResourceLoadBalancing.FindDatabaseAndLocation(list, cachingActiveManagerInstance, isInitialProvisioning, localSiteDatabasesOnly, logger, ref loadBalancingReport2));
            }
            List <MailboxDatabaseWithLocationInfo> list2 = new List <MailboxDatabaseWithLocationInfo>(list.Count);

            foreach (MailboxDatabase mailboxDatabase in list)
            {
                DatabaseLocationInfo serverForActiveDatabaseCopy = PhysicalResourceLoadBalancing.GetServerForActiveDatabaseCopy(mailboxDatabase, cachingActiveManagerInstance, logger);
                if (serverForActiveDatabaseCopy != null && PhysicalResourceLoadBalancing.IsDatabaseInLocalSite(serverForActiveDatabaseCopy, logger) && (qualifiedMinServerVersion == null || serverForActiveDatabaseCopy.ServerVersion >= qualifiedMinServerVersion.Value))
                {
                    list2.Add(new MailboxDatabaseWithLocationInfo(mailboxDatabase, serverForActiveDatabaseCopy));
                }
            }
            return(PhysicalResourceLoadBalancing.VerifyStatusAndSelectDB(list2, domainController, logger, scopeSet));
        }
예제 #3
0
 // Token: 0x06001202 RID: 4610 RVA: 0x00037AF0 File Offset: 0x00035CF0
 private static MailboxDatabaseWithLocationInfo FindDatabaseAndLocation(IList <MailboxDatabase> allDatabases, ActiveManager activeManager, bool isInitialProvisioning, bool localSiteDatabasesOnly, LogMessageDelegate logger, ref LoadBalancingReport loadBalancingReport)
 {
     return(PhysicalResourceLoadBalancing.FindDatabaseAndLocation(allDatabases, activeManager, isInitialProvisioning, localSiteDatabasesOnly, logger, null, ref loadBalancingReport));
 }
예제 #4
0
 // Token: 0x06001205 RID: 4613 RVA: 0x00037DA0 File Offset: 0x00035FA0
 internal static MailboxDatabaseWithLocationInfo FindDatabaseAndLocation(string domainController, LogMessageDelegate logger, ScopeSet scopeSet, bool isInitialProvisioning, bool localSiteDatabasesOnly, IMailboxProvisioningConstraint mailboxProvisioningConstraint, ref LoadBalancingReport loadBalancingReport)
 {
     return(PhysicalResourceLoadBalancing.FindDatabaseAndLocation(domainController, logger, scopeSet, isInitialProvisioning, localSiteDatabasesOnly, null, mailboxProvisioningConstraint, null, ref loadBalancingReport));
 }