aboutsummaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src')
-rw-r--r--appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java b/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java
index 01e4358e9..29de597b1 100644
--- a/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java
+++ b/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java
@@ -25,16 +25,11 @@ import org.openecomp.appc.executionqueue.ExecutionQueueService;
public class ExecutionQueueServiceFactory {
- private static ExecutionQueueService executionQueueService =null;
-
- public static ExecutionQueueService getExecutionQueueService(){
- if(executionQueueService == null){
- synchronized (ExecutionQueueServiceFactory.class){
- if(executionQueueService == null)
- executionQueueService = new ExecutionQueueServiceImpl();
- }
- }
- return executionQueueService;
+ private static class ExecutionQueueServiceHolder {
+ public static final ExecutionQueueService executionQueueService = new ExecutionQueueServiceImpl();
}
+ public static ExecutionQueueService getExecutionQueueService() {
+ return ExecutionQueueServiceHolder.executionQueueService;
+ }
}