void WIDomainPerformanceControlCapabilityChanged::execute(void)
{
    WriteDomainWorkItemStartingInfoMessage();

    try
    {
        getParticipantPtr()->domainPerformanceControlCapabilityChanged();
    }
    catch (std::exception ex)
    {
        WriteDomainWorkItemErrorMessage_Function("Participant::domainPerformanceControlCapabilityChanged");
    }

    PolicyManager* policyManager = getPolicyManager();
    UIntN policyListCount = policyManager->getPolicyListCount();

    for (UIntN i = 0; i < policyListCount; i++)
    {
        try
        {
            Policy* policy = policyManager->getPolicyPtr(i);
            policy->executeDomainPerformanceControlCapabilityChanged(getParticipantIndex());
        }
        catch (policy_index_invalid ex)
        {
            // do nothing.  No item in the policy list at this index.
        }
        catch (std::exception ex)
        {
            WriteDomainWorkItemErrorMessage_Function_Policy("Policy::executeDomainPerformanceControlCapabilityChanged", i);
        }
    }
}
Beispiel #2
0
void WIDomainCreate::execute(void)
{
    WriteDomainWorkItemStartingInfoMessage();

    Bool domainCreated = false;

    try
    {
        getParticipantPtr()->createDomain(getDomainIndex(), m_domainDataPtr, m_domainEnabled);
        domainCreated = true;
    }
    catch (std::exception ex)
    {
        WriteDomainWorkItemErrorMessage_Function("Participant::createDomain");
    }

    *m_domainCreated = domainCreated;

    if (domainCreated == true)
    {
        //
        // Iterate through the list of policies and let them know about the new domain
        //

        PolicyManager* policyManager = getPolicyManager();
        UIntN policyListCount = policyManager->getPolicyListCount();

        for (UIntN i = 0; i < policyListCount; i++)
        {
            try
            {
                Policy* policy = policyManager->getPolicyPtr(i);
                policy->bindDomain(getParticipantIndex(), getDomainIndex());
            }
            catch (policy_index_invalid ex)
            {
                // do nothing.  No item in the policy list at this index.
            }
            catch (std::exception ex)
            {
                WriteDomainWorkItemErrorMessage_Function_Policy("Policy::bindDomain", i);
            }
        }
    }
}