3 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
11 package org.opendaylight.controller.cluster.datastore.node.utils;
13 import org.opendaylight.yangtools.yang.common.QName;
15 import java.util.HashMap;
18 public class QNameFactory {
19 private static final Map<String, QName> cache = new HashMap<>();
21 public static QName create(String name){
22 QName value = cache.get(name);
25 value = cache.get(name);
27 value = QName.create(name);
28 cache.put(name, value);