X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=BRMSGateway%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2FbrmsInterface%2FBRMSHandler.java;h=b460fb87b415bada8eb1e10dda1ab933d4ef1e0f;hb=23c1e146852b43841c666aca584123dec896167e;hp=43031861b126556f6a12af3d96eb2e084573f0d7;hpb=7ea81288603904f0cb6f57936da44d6a3dd521a6;p=policy%2Fengine.git diff --git a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSHandler.java b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSHandler.java index 43031861b..b460fb87b 100644 --- a/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSHandler.java +++ b/BRMSGateway/src/main/java/org/onap/policy/brmsInterface/BRMSHandler.java @@ -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. @@ -95,7 +95,7 @@ public class BRMSHandler implements BackUpHandler{ } } } - Boolean failureFlag = false; + Boolean failureFlag; int i = 0; do{ failureFlag = false; @@ -110,7 +110,7 @@ public class BRMSHandler implements BackUpHandler{ } } i++; - }while(failureFlag && i< bRMSPush.URLListSize()); + }while(failureFlag && i< bRMSPush.urlListSize()); } /* @@ -118,14 +118,17 @@ public class BRMSHandler implements BackUpHandler{ * (non-Javadoc) * @see org.onap.policy.utils.BackUpHandler#runOnNotification(org.onap.policy.api.PDPNotification) */ + @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 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());