Search in sources :

Example 6 with RuleInfoRepo

use of org.smartdata.server.engine.rule.RuleInfoRepo in project SSM by Intel-bigdata.

the class RuleManager method activateRule.

public void activateRule(long ruleID) throws IOException {
    RuleInfoRepo infoRepo = checkIfExists(ruleID);
    submitRuleToScheduler(infoRepo.activate(this));
}
Also used : RuleInfoRepo(org.smartdata.server.engine.rule.RuleInfoRepo)

Example 7 with RuleInfoRepo

use of org.smartdata.server.engine.rule.RuleInfoRepo in project SSM by Intel-bigdata.

the class RuleManager method listRulesInfo.

public List<RuleInfo> listRulesInfo() throws IOException {
    Collection<RuleInfoRepo> infoRepos = mapRules.values();
    List<RuleInfo> retInfos = new ArrayList<>();
    for (RuleInfoRepo infoRepo : infoRepos) {
        RuleInfo info = infoRepo.getRuleInfo();
        if (info.getState() != RuleState.DELETED) {
            retInfos.add(info);
        }
    }
    return retInfos;
}
Also used : RuleInfoRepo(org.smartdata.server.engine.rule.RuleInfoRepo) ArrayList(java.util.ArrayList) DetailedRuleInfo(org.smartdata.model.DetailedRuleInfo) RuleInfo(org.smartdata.model.RuleInfo)

Aggregations

RuleInfoRepo (org.smartdata.server.engine.rule.RuleInfoRepo)7 DetailedRuleInfo (org.smartdata.model.DetailedRuleInfo)4 RuleInfo (org.smartdata.model.RuleInfo)4 MetaStoreException (org.smartdata.metastore.MetaStoreException)2 TranslateResult (org.smartdata.model.rule.TranslateResult)2 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 TimeBasedScheduleInfo (org.smartdata.model.rule.TimeBasedScheduleInfo)1 RuleExecutor (org.smartdata.server.engine.rule.RuleExecutor)1