public void installRule(String name, long interval, Rule rule) {
        rule.supervisor(this).log(log).init();
        Future<?> future=timer.scheduleAtFixedRate(rule, interval, interval, TimeUnit.MILLISECONDS);
        Tuple<Rule,Future<?>> existing=rules.put(name != null? name : rule.name(), new Tuple<>(rule, future));
        if(existing != null)
            existing.getVal2().cancel(true);
    }
public void installRule ( String name , long interval , Rule rule ) { rule . supervisor ( this ) . log ( log ) . init ( ) ; Future < ? > future = timer . scheduleAtFixedRate ( rule , interval , interval , TimeUnit . MILLISECONDS ) ; Tuple < Rule , Future < ? > > existing = rules . put ( name != null ? name : rule . name ( ) , new Tuple < > ( rule , future ) ) ; if ( existing != null ) existing . getVal2 ( ) . cancel ( true ) ; }
Installs a new rule
@param name The name of the rule
@param interval Number of ms between executions of the rule
@param rule The rule