Changing the license and trademark
[aai/sparky-be.git] / src / main / java / org / openecomp / sparky / synchronizer / AggregationSuggestionSynchronizer.java
index 0337f6a..7900193 100644 (file)
@@ -1,41 +1,35 @@
 /**
- * ============LICENSE_START===================================================
- * SPARKY (AAI UI service)
- * ============================================================================
- * Copyright © 2017 AT&T Intellectual Property.
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright © 2017 Amdocs
- * 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.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *       http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ============LICENSE_END=====================================================
+ * ============LICENSE_END=========================================================
  *
- * ECOMP and OpenECOMP are trademarks
- * and service marks of AT&T Intellectual Property.
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
-
 package org.openecomp.sparky.synchronizer;
 
 import static java.util.concurrent.CompletableFuture.supplyAsync;
 
-import org.openecomp.cl.mdc.MdcContext;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
 import java.util.Map;
 import java.util.concurrent.ExecutorService;
 
 import org.openecomp.cl.api.Logger;
 import org.openecomp.cl.eelf.LoggerFactory;
+import org.openecomp.cl.mdc.MdcContext;
 import org.openecomp.sparky.dal.NetworkTransaction;
 import org.openecomp.sparky.dal.rest.HttpMethod;
 import org.openecomp.sparky.dal.rest.OperationResult;
@@ -87,7 +81,8 @@ public class AggregationSuggestionSynchronizer extends AbstractEntitySynchronize
   @Override
   public OperationState doSync() {
     isSyncInProgress = true;
-
+    this.syncDurationInMs = -1;
+    syncStartedTimeStampInMs = System.currentTimeMillis();
     syncEntity();
 
     while (!isSyncDone()) {
@@ -176,8 +171,8 @@ public class AggregationSuggestionSynchronizer extends AbstractEntitySynchronize
 
   @Override
   public String getStatReport(boolean shouldDisplayFinalReport) {
-    return getStatReport(System.currentTimeMillis() - this.syncStartedTimeStampInMs,
-        shouldDisplayFinalReport);
+       syncDurationInMs = System.currentTimeMillis() - syncStartedTimeStampInMs;
+       return getStatReport(syncDurationInMs, shouldDisplayFinalReport);
   }
 
   @Override