import reactor.core.publisher.Mono;
/**
- * Recovery handling of RIC, which means:
+ * Recovery handling of RIC.
+ * This means:
* - load all policy types
* - send all policy instances to the RIC
* --- if that fails remove all policy instances
logger.debug("Handling ric: {}", ric.getConfig().name());
synchronized (ric) {
- if (ric.state().equals(Ric.RicState.RECOVERING)) {
- return; // Already running
+ if (ric.getState() == Ric.RicState.RECOVERING) {
+ logger.debug("Recovery ric: {} is already running", ric.getConfig().name());
+ return;
}
ric.setState(Ric.RicState.RECOVERING);
}