summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-02-22 12:22:56 +0530
committerKanagaraj Manickam <kanagaraj.manickam@huawei.com>2018-02-22 13:59:19 +0000
commit46d52ae5507a47ad0178fc1ee29e8c3d43b8a450 (patch)
treedd396c273ae7928421cf0cde0349f2c564ffaa3a
parent8f02ba857cd0afff5f9e86351b525629ca850128 (diff)
Improve realibility
Issue-ID: VFC-764 Change-Id: I348ac0da670751ce455125aad363d7137ecc299c Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapter2DriverMgrService.java7
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapterMgrService.java7
2 files changed, 2 insertions, 12 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapter2DriverMgrService.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapter2DriverMgrService.java
index 535053bf..83652b70 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapter2DriverMgrService.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapter2DriverMgrService.java
@@ -107,9 +107,6 @@ public class VnfmAdapter2DriverMgrService implements IVnfmAdapter2DriverMgrServi
private static class RegisterVnfm2DriverMgrThread implements Runnable {
- // Thread lock Object
- private final Object lockObject = new Object();
-
private IVnfmAdapter2DriverManager adapter2DriverMgr = new VnfmAdapter2DriverManager();
// url and mothedtype
@@ -153,9 +150,7 @@ public class VnfmAdapter2DriverMgrService implements IVnfmAdapter2DriverMgrServi
// if registration fails,wait one minute and try again
try {
- synchronized(lockObject) {
- lockObject.wait(Constant.REPEAT_REG_TIME);
- }
+ Thread.sleep(Constant.REPEAT_REG_TIME);
} catch(InterruptedException e) {
LOG.error(e.getMessage(), e);
// Restore interrupted state...
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapterMgrService.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapterMgrService.java
index 28c018cb..dabaf380 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapterMgrService.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/api/internalsvc/impl/VnfmAdapterMgrService.java
@@ -106,9 +106,6 @@ public class VnfmAdapterMgrService implements IVnfmAdapterMgrService {
private static class RegisterVnfmAdapterThread implements Runnable {
- // Thread lock Object
- private final Object lockObject = new Object();
-
private IDriver2MSBManager adapter2MSBMgr = new Driver2MSBManager();
// url and mothedtype
@@ -152,9 +149,7 @@ public class VnfmAdapterMgrService implements IVnfmAdapterMgrService {
// if registration fails,wait one minute and try again
try {
- synchronized(lockObject) {
- lockObject.wait(Constant.REPEAT_REG_TIME);
- }
+ Thread.sleep(Constant.REPEAT_REG_TIME);
} catch(InterruptedException e) {
LOG.error(e.getMessage(), e);
// Restore interrupted state...