コード例 #1
0
 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");
 }
コード例 #2
0
ファイル: ActionFactory.cs プロジェクト: zmyer/service-fabric
 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>();
 }
コード例 #3
0
        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();
        }
コード例 #4
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);
        }
コード例 #5
0
 public CancelJobAction(CoordinatorEnvironment environment, IPolicyAgentClient policyAgentClient, ITenantJob tenantJob)
     : base(environment, ActionType.None)
 {
     this.policyAgentClient = policyAgentClient.Validate("policyAgentClient");
     this.tenantJob         = tenantJob.Validate("tenantJob");
 }