예제 #1
0
 public DatabaseProcessor(ILoadBalanceSettings settings, DatabaseDrainControl drainControl, ILogger logger, DirectoryDatabase database)
 {
     this.settings     = settings;
     this.drainControl = drainControl;
     this.logger       = logger;
     this.database     = database;
 }
        public static CapacityProjectionData FromSettings(ILoadBalanceSettings settings)
        {
            ByteQuantifiedSize reservedCapacity       = ByteQuantifiedSize.FromGB((ulong)((long)settings.ReservedCapacityInGb));
            double             consumerGrowthRate     = (double)settings.ConsumerGrowthRate / 100.0;
            double             organizationGrowthRate = (double)settings.OrganizationGrowthRate / 100.0;

            return(new CapacityProjectionData(consumerGrowthRate, organizationGrowthRate, settings.CapacityGrowthPeriods, reservedCapacity));
        }
예제 #3
0
 public DirectoryProvider(IClientFactory clientFactory, Server localServer, ILoadBalanceSettings settings, IEnumerable <IDirectoryListener> listeners, ILogger logger, LoadBalanceAnchorContext context)
 {
     this.clientFactory = clientFactory;
     this.localServer   = localServer;
     this.settings      = settings;
     this.logger        = logger;
     this.context       = context;
     this.listeners     = new List <IDirectoryListener>(listeners ?? ((IEnumerable <IDirectoryListener>)Array <IDirectoryListener> .Empty));
 }
예제 #4
0
        public static IList <Guid> GetNonMovableOrgsList(ILoadBalanceSettings loadBalanceSettings)
        {
            IList <Guid> list = new List <Guid>();

            foreach (string input in loadBalanceSettings.NonMovableOrganizationIds.Split(new string[]
            {
                ";"
            }, StringSplitOptions.RemoveEmptyEntries))
            {
                Guid item;
                if (Guid.TryParse(input, out item))
                {
                    list.Add(item);
                }
            }
            return(list);
        }
예제 #5
0
 public LoadBalanceWorkload(ILoadBalanceSettings settings)
 {
     this.queue = new RubsQueue(settings);
 }
예제 #6
0
 public InjectMoveRequest(string batchName, DirectoryMailbox mailbox, ILogger logger, bool protect, RequestPriority requestPriority, ADObjectId mailboxObjectId, DirectoryIdentity targetDatabaseIdentity, ILoadBalanceSettings settings, CmdletExecutionPool cmdletPool) : base("New-MoveRequest", cmdletPool, logger)
 {
     this.settings       = settings;
     this.TargetDatabase = targetDatabaseIdentity;
     this.BatchName      = batchName;
     this.Mailbox        = mailbox;
     this.Protect        = protect;
     AnchorUtil.ThrowOnNullArgument(mailbox, "mailbox");
     base.Command.AddParameter("Identity", mailboxObjectId);
     base.Command.AddParameter("WorkloadType", RequestWorkloadType.LoadBalancing);
     if (!string.IsNullOrWhiteSpace(batchName))
     {
         base.Command.AddParameter("BatchName", batchName);
     }
     if (targetDatabaseIdentity != null)
     {
         DatabaseIdParameter value = new DatabaseIdParameter(targetDatabaseIdentity.ADObjectId);
         if (mailbox.IsArchiveOnly)
         {
             base.Command.AddParameter("ArchiveTargetDatabase", value);
             base.Command.AddParameter("ArchiveOnly");
         }
         else
         {
             base.Command.AddParameter("TargetDatabase", value);
             base.Command.AddParameter("PrimaryOnly");
         }
     }
     base.Command.AddParameter("CompletedRequestAgeLimit", 0);
     base.Command.AddParameter("Priority", requestPriority);
     if (protect)
     {
         base.Command.AddParameter("Protect");
     }
 }
        public static IOperationRetryManager Create(ILogger logger)
        {
            ILoadBalanceSettings value = LoadBalanceADSettings.Instance.Value;

            return(LoadBalanceOperationRetryManager.Create(value.TransientFailureMaxRetryCount, value.TransientFailureRetryDelay, logger));
        }
예제 #8
0
 public RubsQueue(ILoadBalanceSettings settings)
 {
     this.settings = settings;
 }
 public PolicyActivationControl(IMailboxPolicy policy, ILoadBalanceSettings settings)
 {
     AnchorUtil.ThrowOnNullArgument(policy, "policy");
     this.policy   = policy;
     this.settings = settings;
 }
예제 #10
0
 public SoftDeletedMailboxRemovalRequest(Guid mailboxGuid, Guid databaseGuid, ILogger logger, CmdletExecutionPool cmdletPool, ILoadBalanceSettings settings) : base("Remove-StoreMailbox", cmdletPool, logger)
 {
     this.mailboxGuid  = mailboxGuid;
     this.databaseGuid = databaseGuid;
     this.settings     = settings;
     base.Command.AddParameter("Identity", mailboxGuid);
     base.Command.AddParameter("Database", databaseGuid.ToString());
     base.Command.AddParameter("MailboxState", "SoftDeleted");
 }
예제 #11
0
 public BandBasedLoadBalance(IList <Band> bands, ILogger logger, ILoadBalanceSettings settings)
 {
     this.settings = settings;
     this.logger   = logger;
     this.bands    = bands;
 }
예제 #12
0
 public ZeroItemsPendingUpgradePolicy(ILoadBalanceSettings settings)
 {
     this.settings = settings;
 }