예제 #1
0
        public MDBReplicationHealthMonitor(WlmResource owner, Guid mdbGuid) : base(owner, new MdbReplicationResourceHealthMonitorKey(mdbGuid))
        {
            MailboxReplicationServicePerMdbPerformanceCountersInstance perfCounter = MDBPerfCounterHelperCollection.GetMDBHelper(mdbGuid, true).PerfCounter;
            WorkloadType wlmWorkloadType = owner.WlmWorkloadType;

            if (wlmWorkloadType == WorkloadType.MailboxReplicationService)
            {
                base.ResourceHealthPerfCounter  = perfCounter.ResourceHealthMDBReplication;
                base.DynamicCapacityPerfCounter = perfCounter.DynamicCapacityMDBReplication;
                return;
            }
            if (wlmWorkloadType == WorkloadType.MailboxReplicationServiceHighPriority)
            {
                base.ResourceHealthPerfCounter  = perfCounter.ResourceHealthMDBReplicationHiPri;
                base.DynamicCapacityPerfCounter = perfCounter.DynamicCapacityMDBReplicationHiPri;
                return;
            }
            switch (wlmWorkloadType)
            {
            case WorkloadType.MailboxReplicationServiceInternalMaintenance:
                base.ResourceHealthPerfCounter  = perfCounter.ResourceHealthMDBReplicationInternalMaintenance;
                base.DynamicCapacityPerfCounter = perfCounter.DynamicCapacityMDBReplicationInternalMaintenance;
                return;

            case WorkloadType.MailboxReplicationServiceInteractive:
                base.ResourceHealthPerfCounter  = perfCounter.ResourceHealthMDBReplicationCustomerExpectation;
                base.DynamicCapacityPerfCounter = perfCounter.DynamicCapacityMDBReplicationCustomerExpectation;
                return;

            default:
                return;
            }
        }
예제 #2
0
        public ADReplicationHealthMonitor(WlmResource owner) : base(owner, ADResourceKey.Key)
        {
            WorkloadType wlmWorkloadType = owner.WlmWorkloadType;

            if (wlmWorkloadType == WorkloadType.MailboxReplicationService)
            {
                base.ResourceHealthPerfCounter  = MailboxReplicationServicePerformanceCounters.ADReplicationResourceHealth;
                base.DynamicCapacityPerfCounter = MailboxReplicationServicePerformanceCounters.ADReplicationDynamicCapacity;
                return;
            }
            if (wlmWorkloadType == WorkloadType.MailboxReplicationServiceHighPriority)
            {
                base.ResourceHealthPerfCounter  = MailboxReplicationServicePerformanceCounters.ADReplicationResourceHealthHiPri;
                base.DynamicCapacityPerfCounter = MailboxReplicationServicePerformanceCounters.ADReplicationDynamicCapacityHiPri;
                return;
            }
            switch (wlmWorkloadType)
            {
            case WorkloadType.MailboxReplicationServiceInternalMaintenance:
                base.ResourceHealthPerfCounter  = MailboxReplicationServicePerformanceCounters.ADReplicationResourceHealthInternalMaintenance;
                base.DynamicCapacityPerfCounter = MailboxReplicationServicePerformanceCounters.ADReplicationDynamicCapacityInternalMaintenance;
                return;

            case WorkloadType.MailboxReplicationServiceInteractive:
                base.ResourceHealthPerfCounter  = MailboxReplicationServicePerformanceCounters.ADReplicationResourceHealthCustomerExpectation;
                base.DynamicCapacityPerfCounter = MailboxReplicationServicePerformanceCounters.ADReplicationDynamicCapacityCustomerExpectation;
                return;

            default:
                return;
            }
        }
예제 #3
0
 public WlmResourceHealthMonitor(WlmResource owner, ResourceKey resourceKey)
 {
     this.Owner            = owner;
     this.WlmResourceKey   = resourceKey;
     this.healthTracker    = new WlmHealthSLA();
     this.admissionControl = new DefaultAdmissionControl(this.WlmResourceKey, new RemoveResourceDelegate(this.ResetAdmissionControl), null, "MRS_WlmResourceHealthMonitor");
     this.configContext    = new GenericSettingsContext("WlmHealthMonitor", this.WlmResourceKey.ToString(), null);
 }