public RequestRepairAction(CoordinatorEnvironment environment, IPolicyAgentClient policyAgentClient, IRepairTask repairTask, RepairActionProvider repairActionProvider) : base(environment, ActionType.RequestRepair) { this.policyAgentClient = policyAgentClient.Validate("policyAgentClient"); this.repairTask = repairTask.Validate("repairTask"); this.repairActionProvider = repairActionProvider.Validate("repairActionProvider"); }
public ActionFactory( CoordinatorEnvironment environment, IPolicyAgentClient policyAgentClient, IRepairManager repairManager, RepairActionProvider repairActionProvider) { this.environment = environment.Validate("environment"); this.policyAgentClient = policyAgentClient.Validate("policyAgentClient"); this.repairManager = repairManager.Validate("repairManager"); this.repairActionProvider = repairActionProvider.Validate("repairActionProvider"); this.jobResponseMap = new Dictionary <Guid, JobStepResponseEnum>(); }
public CoordinatorCommandProcessor( CoordinatorEnvironment environment, IPolicyAgentClient policyAgentClient, IJobBlockingPolicyManager jobBlockingPolicyManager, IAllowActionMap allowActionMap) { this.environment = environment.Validate("environment"); this.policyAgentClient = policyAgentClient.Validate("policyAgentClient"); this.jobBlockingPolicyManager = jobBlockingPolicyManager.Validate("jobBlockingPolicyManager"); this.allowActionMap = allowActionMap.Validate("allowActionMap"); this.traceType = environment.CreateTraceType("CommandProcessor"); this.commandHandler = new CommandHandler(this.traceType); RegisterCommandHandlers(); }
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); }
public CancelJobAction(CoordinatorEnvironment environment, IPolicyAgentClient policyAgentClient, ITenantJob tenantJob) : base(environment, ActionType.None) { this.policyAgentClient = policyAgentClient.Validate("policyAgentClient"); this.tenantJob = tenantJob.Validate("tenantJob"); }