コード例 #1
0
        public PartitionLoadBalancerCore(
            PartitionController partitionController,
            DocumentServiceLeaseContainer leaseContainer,
            LoadBalancingStrategy partitionLoadBalancingStrategy,
            TimeSpan leaseAcquireInterval)
        {
            if (partitionController == null)
            {
                throw new ArgumentNullException(nameof(partitionController));
            }
            if (leaseContainer == null)
            {
                throw new ArgumentNullException(nameof(leaseContainer));
            }
            if (partitionLoadBalancingStrategy == null)
            {
                throw new ArgumentNullException(nameof(partitionLoadBalancingStrategy));
            }

            this.partitionController            = partitionController;
            this.leaseContainer                 = leaseContainer;
            this.partitionLoadBalancingStrategy = partitionLoadBalancingStrategy;
            this.leaseAcquireInterval           = leaseAcquireInterval;
            this.cancellationTokenSource        = new CancellationTokenSource();
        }
コード例 #2
0
 public PartitionManagerCore(Bootstrapper bootstrapper, PartitionController partitionController, PartitionLoadBalancer partitionLoadBalancer)
 {
     this.bootstrapper          = bootstrapper;
     this.partitionController   = partitionController;
     this.partitionLoadBalancer = partitionLoadBalancer;
 }