Improve metadata support
[clamp.git] / src / main / java / org / onap / clamp / policy / downloader / PolicyEngineController.java
index 50be035..0c3f677 100644 (file)
@@ -27,18 +27,14 @@ import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 
 import java.time.Instant;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map.Entry;
 
+import org.json.simple.parser.ParseException;
 import org.onap.clamp.clds.client.PolicyEngineServices;
 import org.onap.clamp.loop.template.PolicyModelsRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
 import org.springframework.scheduling.annotation.Scheduled;
-import org.yaml.snakeyaml.Yaml;
 
 /**
  * This class implements a periodic job that is done in the background to
@@ -65,7 +61,7 @@ public class PolicyEngineController {
         this.policyEngineServices = policyEngineService;
     }
 
-    @Scheduled(fixedRate = 120000)
+    @Scheduled(fixedRate = 300000)
     public synchronized void synchronizeAllPolicies() {
         policyEngineServices.synchronizeAllPolicies();
         lastInstantExecuted = Instant.now();
@@ -75,5 +71,8 @@ public class PolicyEngineController {
         return lastInstantExecuted;
     }
 
-
+    @Scheduled(fixedRate = 300000)
+    public synchronized void downloadPdpGroups() throws ParseException {
+        policyEngineServices.downloadPdpGroups();
+    }
 }