import java.util.List;
import java.util.Map;
import java.util.Vector;
+
import lombok.Getter;
import lombok.Setter;
+
import org.oransc.policyagent.clients.A1Client.A1ProtocolType;
import org.oransc.policyagent.configuration.RicConfig;
* Represents the dynamic information about a NearRealtime-RIC.
*/
public class Ric {
+
private final RicConfig ricConfig;
private final List<String> managedElementIds;
@Setter
private A1ProtocolType protocolVersion = A1ProtocolType.UNKNOWN;
+ @Getter
+ private final Lock lock = new Lock();
/**
* Creates the Ric. Initial state is {@link RicState.NOT_INITIATED}.
*/
public Ric(RicConfig ricConfig) {
this.ricConfig = ricConfig;
- this.managedElementIds = new ArrayList<>(ricConfig.managedElementIds());
+ this.managedElementIds = new ArrayList<>(ricConfig.managedElementIds()); // TODO, this is config why is it
+ // copied here?
}
public String name() {
*/
public enum RicState {
/**
- * The agent view of the agent may be inconsistent.
+ * The agent view of the Ric may be inconsistent.
*/
UNDEFINED,
/**
*/
IDLE,
/**
- * The Ric states are recovered.
+ * The agent is synchronizing the view of the Ric.
*/
- RECOVERING
+ SYNCHRONIZING
}
}