X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-persister-feature-adapter%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfigpusherfeature%2Finternal%2FConfigPushingRunnable.java;h=5c257effba14cfe740c7ad10d1d94527beaf0546;hb=4497e2212e73e13356447b9644bbdc935411949a;hp=b0e64b84d2adf4433fd378b8fca5d35eb97c4e19;hpb=0a16f37f1baa4a2616e9b7289a445649b4f3132d;p=controller.git diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java index b0e64b84d2..5c257effba 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java @@ -7,11 +7,11 @@ */ package org.opendaylight.controller.configpusherfeature.internal; +import com.google.common.collect.LinkedHashMultimap; import java.util.ArrayList; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; - import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeatureEvent; import org.apache.karaf.features.FeatureEvent.EventType; @@ -20,10 +20,8 @@ import org.opendaylight.controller.config.persist.api.ConfigPusher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.collect.LinkedHashMultimap; - public class ConfigPushingRunnable implements Runnable { - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigPushingRunnable.class); + private static final Logger LOG = LoggerFactory.getLogger(ConfigPushingRunnable.class); private static final int POLL_TIME = 1; private BlockingQueue queue; private FeatureConfigPusher configPusher; @@ -40,23 +38,23 @@ public class ConfigPushingRunnable implements Runnable { while(true) { try { if(!interuppted) { - if(toInstall.isEmpty()) { - event = queue.take(); - } else { - event = queue.poll(POLL_TIME, TimeUnit.MILLISECONDS); - } - if(event != null && event.getFeature() !=null) { - processFeatureEvent(event,toInstall); - } + if(toInstall.isEmpty()) { + event = queue.take(); + } else { + event = queue.poll(POLL_TIME, TimeUnit.MILLISECONDS); + } + if(event != null && event.getFeature() !=null) { + processFeatureEvent(event,toInstall); + } } else if(toInstall.isEmpty()) { - LOGGER.error("ConfigPushingRunnable - exiting"); + LOG.error("ConfigPushingRunnable - exiting"); return; } } catch (InterruptedException e) { - LOGGER.error("ConfigPushingRunnable - interupted"); + LOG.error("ConfigPushingRunnable - interupted"); interuppted = true; } catch (Exception e) { - LOGGER.error("Exception while processing features {}", e); + LOG.error("Exception while processing features ", e); } } } @@ -73,7 +71,7 @@ public class ConfigPushingRunnable implements Runnable { protected void logPushResult(LinkedHashMultimap results) { for(Feature f:results.keySet()) { - LOGGER.info("Pushed configs for feature {} {}",f,results.get(f)); + LOG.info("Pushed configs for feature {} {}",f,results.get(f)); } } }