public boolean apply(LoadBalancerRule rule) { logger.trace("looking for state on rule %s", checkNotNull(rule, "rule")); rule = refresh(rule); if (rule == null) return false; logger.trace( "%s: looking for rule state %s: currently: %s", rule.getId(), State.ACTIVE, rule.getState()); return rule.getState() == State.ACTIVE; }
private LoadBalancerRule refresh(LoadBalancerRule rule) { return client.getLoadBalancerApi().getLoadBalancerRule(rule.getId()); }