Merge "Update docker tag convention"
[policy/engine.git] / BRMSGateway / src / main / java / org / onap / policy / brmsInterface / BRMSHandler.java
index a11e8b4..b460fb8 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP Policy Engine
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 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.
@@ -110,7 +110,7 @@ public class BRMSHandler implements BackUpHandler{
                                }
                        }
                        i++;
-               }while(failureFlag && i< bRMSPush.URLListSize());
+               }while(failureFlag && i< bRMSPush.urlListSize());
        }
        
        /*
@@ -120,13 +120,15 @@ public class BRMSHandler implements BackUpHandler{
         */
        @Override
        public void runOnNotification(PDPNotification notification){
+               // reset the BRMSPush data structures
+               bRMSPush.resetDS();
                if(notification.getNotificationType().equals(NotificationType.REMOVE)){
                        removedPolicies(notification.getRemovedPolicies());
                }else if(notification.getNotificationType().equals(NotificationType.UPDATE)|| notification.getNotificationType().equals(NotificationType.BOTH)){
                        logger.info("Updated Policies: \n");
                        ArrayList<PolicyConfig> brmsPolicies = addedPolicies(notification);
                        Boolean successFlag = false;
-                       for(int i=0; !successFlag && i< bRMSPush.URLListSize(); i++){
+                       for(int i=0; !successFlag && i< bRMSPush.urlListSize(); i++){
                                if(i!=0){
                                        for(PolicyConfig policyConfig: brmsPolicies){
                                                logger.info("Policy Retry with this Name notified: " + policyConfig.getPolicyName());