aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/main/java/org')
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/notification/PolicyCommonTracker.java10
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java14
2 files changed, 6 insertions, 18 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyCommonTracker.java b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyCommonTracker.java
index 67d9b988..5f702daf 100644
--- a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyCommonTracker.java
+++ b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyCommonTracker.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -104,10 +104,8 @@ public abstract class PolicyCommonTracker {
* Removes a set of PDPs from all policies within the tracker.
*
* @param notifyData data identifying the policy and the PDPs to be removed from it
- * @param statusList status messages are added here if policies become complete as a
- * result of this operation
*/
- public void removeData(PolicyPdpNotificationData notifyData, List<PolicyStatus> statusList) {
+ public void removeData(PolicyPdpNotificationData notifyData) {
policy2data.computeIfPresent(notifyData.getPolicyId(), (policyId, data) -> {
@@ -116,9 +114,7 @@ public abstract class PolicyCommonTracker {
return data;
}
- // this policy is complete - notify
- statusList.add(makeStatus(policyId, data));
-
+ // this policy is complete
return (shouldRemove(data) ? null : data);
});
}
diff --git a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
index c24cafca..430a09b9 100644
--- a/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
+++ b/main/src/main/java/org/onap/policy/pap/main/notification/PolicyNotifier.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP PAP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -181,12 +181,8 @@ public class PolicyNotifier {
* @param data data to be added
*/
public synchronized void addDeploymentData(PolicyPdpNotificationData data) {
- PolicyNotification notification = new PolicyNotification();
-
- undeployTracker.removeData(data, notification.getDeleted());
+ undeployTracker.removeData(data);
deployTracker.addData(data);
-
- publish(notification);
}
/**
@@ -196,12 +192,8 @@ public class PolicyNotifier {
* @param data data to be added
*/
public synchronized void addUndeploymentData(PolicyPdpNotificationData data) {
- PolicyNotification notification = new PolicyNotification();
-
- deployTracker.removeData(data, notification.getAdded());
+ deployTracker.removeData(data);
undeployTracker.addData(data);
-
- publish(notification);
}
/**