private RicState state = RicState.UNDEFINED;
private Map<String, PolicyType> supportedPolicyTypes = new HashMap<>();
@Getter
@Setter
private A1ProtocolType protocolVersion = A1ProtocolType.UNKNOWN;
private RicState state = RicState.UNDEFINED;
private Map<String, PolicyType> supportedPolicyTypes = new HashMap<>();
@Getter
@Setter
private A1ProtocolType protocolVersion = A1ProtocolType.UNKNOWN;
* @param managedElementId the node name to check.
* @return true if the given node is managed by this Ric.
*/
* @param managedElementId the node name to check.
* @return true if the given node is managed by this Ric.
*/
- public boolean isManaging(String managedElementId) {
- return ricConfig.managedElementIds().contains(managedElementId);
+ public synchronized boolean isManaging(String managedElementId) {
+ return managedElementIds.contains(managedElementId);
- public void addManagedElement(String managedElementId) {
- if (!ricConfig.managedElementIds().contains(managedElementId)) {
- ricConfig.managedElementIds().add(managedElementId);
+ public synchronized void addManagedElement(String managedElementId) {
+ if (!managedElementIds.contains(managedElementId)) {
+ managedElementIds.add(managedElementId);
- public void removeManagedElement(String managedElementId) {
- ricConfig.managedElementIds().remove(managedElementId);
+ public synchronized void removeManagedElement(String managedElementId) {
+ managedElementIds.remove(managedElementId);
- public Collection<PolicyType> getSupportedPolicyTypes() {
- return supportedPolicyTypes.values();
+ public synchronized Collection<PolicyType> getSupportedPolicyTypes() {
+ return new Vector<>(supportedPolicyTypes.values());
- public Collection<String> getSupportedPolicyTypeNames() {
- return supportedPolicyTypes.keySet();
+ public synchronized Collection<String> getSupportedPolicyTypeNames() {
+ return new Vector<>(supportedPolicyTypes.keySet());
supportedPolicyTypes.put(type.name(), type);
}
/**
* Removes all policy type as supported by this Ric.
*/
supportedPolicyTypes.put(type.name(), type);
}
/**
* Removes all policy type as supported by this Ric.
*/