/*-
* ============LICENSE_START=======================================================
- * openECOMP : APP-C
+ * APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.openecomp.appc.executionqueue.impl;
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;
+ }
}