コード例 #1
0
        public AzureParallelDisabledCoordinator(
            CoordinatorEnvironment environment,
            string tenantId,
            Func <Task <IPolicyAgentClient> > policyAgentClientAsyncFactory,
            IRepairManager repairManager,
            IHealthClient healthClient,
            IActivityLogger activityLogger,
            Guid partitionId,
            long replicaId)
        {
            this.environment = environment.Validate("environment");
            this.tenantId    = tenantId.Validate("tenantId");
            this.partitionId = partitionId;
            this.policyAgentClientAsyncFactory = policyAgentClientAsyncFactory.Validate("policyAgentClientAsyncFactory");

            this.traceType = environment.CreateTraceType("DisabledCoordinator");

            this.repairManager = repairManager.Validate("repairManager");
            this.healthClient  = healthClient.Validate("healthClient");

            this.configSection  = environment.Config;
            this.activityLogger = activityLogger.Validate("activityLogger");

            var assembly = this.GetType().GetTypeInfo().Assembly;

            assemblyFileVersion = FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion;
        }
コード例 #2
0
        public RoleInstanceHealthWatchdog(IConfigSection configSection, string configKeyPrefix, IHealthClient healthClient)
        {
            this.configSection   = configSection.Validate("configSection");
            this.configKeyPrefix = configKeyPrefix.Validate("configKeyPrefix");
            this.healthClient    = healthClient.Validate("healthClient");

            healthPolicyManager = new DynamicRoleInstanceHealthPolicyManager(configSection, configKeyPrefix);
        }
コード例 #3
0
 public DelayLoadCoordinator(
     Func <CoordinatorFactoryArgs, IInfrastructureCoordinator> factory,
     CoordinatorFactoryArgs factoryArgs,
     IHealthClient healthClient,
     IConfigSection configSection)
 {
     this.factory       = factory.Validate("factory");
     this.factoryArgs   = factoryArgs.Validate("factoryArgs");
     this.healthClient  = healthClient.Validate("healthClient");
     this.configSection = configSection.Validate("configSection");
 }
コード例 #4
0
        public AutopilotInfrastructureCoordinator(
            CoordinatorEnvironment environment,
            IAutopilotDMClient dmClient,
            IRepairManager repairManager,
            IHealthClient healthClient,
            Guid partitionId,
            long replicaId)
        {
            this.environment = environment.Validate("environment");
            this.partitionId = partitionId;

            this.traceType = environment.CreateTraceType("Coordinator");

            this.repairManager = repairManager.Validate("repairManager");
            this.healthClient  = healthClient.Validate("healthClient");
            this.dmClient      = new AutopilotDMClientWrapper(dmClient.Validate("dmClient"));

            this.configReader = new ConfigReader(environment.Config);
        }
コード例 #5
0
        public AzureParallelInfrastructureCoordinator(
            CoordinatorEnvironment environment,
            string tenantId,
            IPolicyAgentClient policyAgentClient,
            IRepairManager repairManager,
            IHealthClient healthClient,
            ICoordinatorCommandProcessor coordinatorCommandProcessor,
            IJobBlockingPolicyManager jobBlockingPolicyManager,
            IActionPolicyFactory actionPolicyFactory,
            IActivityLogger activityLogger,
            Guid partitionId,
            long replicaId)
        {
            this.environment       = environment.Validate("environment");
            this.tenantId          = tenantId.Validate("tenantId");
            this.partitionId       = partitionId;
            this.policyAgentClient = policyAgentClient.Validate("policyAgentClient");

            this.traceType       = environment.CreateTraceType("Coordinator");
            this.actionTraceType = environment.CreateTraceType("Action");

            this.repairManager = repairManager.Validate("repairManager");
            this.healthClient  = healthClient.Validate("healthClient");

            this.configSection = environment.Config;
            this.coordinatorCommandProcessor = coordinatorCommandProcessor.Validate("coordinatorCommandProcessor");
            this.jobBlockingPolicyManager    = jobBlockingPolicyManager.Validate("jobBlockingPolicyManager");
            this.actionPolicies = actionPolicyFactory.Validate("actionPolicyFactory").Create();
            this.activityLogger = activityLogger.Validate("activityLogger");

            var assembly = this.GetType().GetTypeInfo().Assembly;

            assemblyFileVersion = FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion;

            var healthWatchdogFactory = new RoleInstanceHealthWatchdogFactory(configSection, healthClient);

            roleInstanceHealthWatchdog = healthWatchdogFactory.Create(Constants.ConfigKeys.ConfigKeyPrefix);
        }
コード例 #6
0
 public RoleInstanceHealthWatchdogFactory(IConfigSection configSection, IHealthClient healthClient)
 {
     this.configSection = configSection.Validate("configSection");
     this.healthClient  = healthClient.Validate("healthClient");
 }