diff options
author | 2018-07-29 16:13:45 +0300 | |
---|---|---|
committer | 2018-07-29 16:20:34 +0300 | |
commit | 5b593496b8f1b8e8be8d7d2dbcc223332e65a49b (patch) | |
tree | 2f9dfc45191e723da69cf74be7829784e9741b94 /catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java | |
parent | 9200382f2ce7b4bb729aa287d0878004b2d2b4f9 (diff) |
re base code
Change-Id: I12a5ca14a6d8a87e9316b9ff362eb131105f98a5
Issue-ID: SDC-1566
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java index 20dd4141f9..0d883a7877 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/cache/jobs/DeleteJob.java @@ -23,38 +23,37 @@ package org.openecomp.sdc.be.model.cache.jobs; import org.openecomp.sdc.be.dao.api.ActionStatus; import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum; import org.openecomp.sdc.be.model.cache.DaoInfo; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.openecomp.sdc.common.log.wrappers.Logger; /** * Created by mlando on 9/20/2016. */ public class DeleteJob extends Job { - private static Logger log = LoggerFactory.getLogger(DeleteJob.class.getName()); + private static final Logger log = Logger.getLogger(DeleteJob.class.getName()); - public DeleteJob(DaoInfo daoInfo, String componentId, NodeTypeEnum nodeTypeEnum, long timestamp) { - super(daoInfo, componentId, nodeTypeEnum, timestamp); + public DeleteJob(DaoInfo daoInfo, String componentId, NodeTypeEnum nodeTypeEnum, long timestamp) { + super(daoInfo, componentId, nodeTypeEnum, timestamp); - } + } - @Override - public Object doWork() { - try { - log.trace("starting work on job."); - log.trace("delete component in cache, componentId:{} of nodeTypeEnum:{} with timestamp:{}.", componentId, - nodeTypeEnum, timestamp); - ActionStatus status = this.daoInfo.getComponentCache().deleteComponentFromCache(componentId); - if (!ActionStatus.OK.equals(status)) { - log.debug("failed to delete componentId:{} nodeTypeEnum:", componentId, nodeTypeEnum); - return false; - } - log.trace("cache successfully deleted componentId:{} nodeTypeEnum:{} timestamp:{}.", componentId, - nodeTypeEnum, timestamp); - return true; - } catch (Exception e) { - log.debug("an exception was encountered durring deletejob", e); - } - return false; + @Override + public Object doWork() { + try { + log.trace("starting work on job."); + log.trace("delete component in cache, componentId:{} of nodeTypeEnum:{} with timestamp:{}.", componentId, + nodeTypeEnum, timestamp); + ActionStatus status = this.daoInfo.getComponentCache().deleteComponentFromCache(componentId); + if (!ActionStatus.OK.equals(status)) { + log.debug("failed to delete componentId:{} nodeTypeEnum:", componentId, nodeTypeEnum); + return false; + } + log.trace("cache successfully deleted componentId:{} nodeTypeEnum:{} timestamp:{}.", componentId, + nodeTypeEnum, timestamp); + return true; + } catch (Exception e) { + log.debug("an exception was encountered durring deletejob", e); + } + return false; - } + } } |