Search in sources :

Example 1 with SimpleRuleActorChain

use of org.thingsboard.server.actors.rule.SimpleRuleActorChain in project thingsboard by thingsboard.

the class RuleManager method refreshRuleChain.

private void refreshRuleChain() {
    Set<RuleActorMetaData> activeRuleSet = new HashSet<>();
    for (Map.Entry<RuleMetaData, RuleActorMetaData> rule : ruleMap.entrySet()) {
        if (rule.getKey().getState() == ComponentLifecycleState.ACTIVE) {
            activeRuleSet.add(rule.getValue());
        }
    }
    ruleChain = new SimpleRuleActorChain(activeRuleSet);
}
Also used : RuleActorMetaData(org.thingsboard.server.actors.rule.RuleActorMetaData) SimpleRuleActorChain(org.thingsboard.server.actors.rule.SimpleRuleActorChain) RuleMetaData(org.thingsboard.server.common.data.rule.RuleMetaData)

Aggregations

RuleActorMetaData (org.thingsboard.server.actors.rule.RuleActorMetaData)1 SimpleRuleActorChain (org.thingsboard.server.actors.rule.SimpleRuleActorChain)1 RuleMetaData (org.thingsboard.server.common.data.rule.RuleMetaData)1