Package org.apache.stratos.throttling.manager.rules

Examples of org.apache.stratos.throttling.manager.rules.RuleInvoker


            List<ThrottlingTaskDataProviderConfiguration> dataProviderConfigs)
            throws ThrottlingException {
        this.parameters = parameters;
        this.dataProviderIterator = new DataProviderIterator(dataProviderConfigs);
        // initialize the rule invokers
        ruleInvoker = new RuleInvoker();
    }
View Full Code Here


            log.error(msg, e);
            throw new JobExecutionException(msg, e);
        }

        // invoke the rule.
        RuleInvoker ruleInvoker = task.getRuleInvoker();
        try {
            //updating the rule. this is important if we are having more than one managers running
            ruleInvoker.updateRules();
            ruleInvoker.invoke(knowledgeBase);
            log.info("Throttling rules executed successfully");
        } catch (ThrottlingException e) {
            String msg = "Error in invoking the throttling rule invoker.";
            log.error(msg, e);
            throw new JobExecutionException(msg, e);
View Full Code Here

            ruleContentResource.setContent(ruleContent);
            systemRegistry.put(StratosConstants.THROTTLING_RULES_PATH, ruleContentResource);

            List<Task> tasks = Util.getTasks();
            for (Task task : tasks) {
                RuleInvoker ruleInvoker = task.getRuleInvoker();
                ruleInvoker.updateRules();
            }
            updateSuccess = true;
        } finally {
            if (updateSuccess) {
                systemRegistry.commitTransaction();
View Full Code Here

            // initialize the knowledge base
            List<Object> knowledgeBase = new ArrayList<Object>();
            ThrottlingDataContext throttlingDataContext =
                    KnowledgeBaseManager.feedKnowledgeBase(currentTenantId, task, knowledgeBase);

            RuleInvoker ruleInvoker = task.getRuleInvoker();
            ruleInvoker.invoke(knowledgeBase);

            log.info("Throttling rules executed for tenant id: " + currentTenantId);
           
            ValidationInfoManager.persistValidationDetails(throttlingDataContext);
        }
View Full Code Here

TOP

Related Classes of org.apache.stratos.throttling.manager.rules.RuleInvoker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.