2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.netconf.confignetconfconnector.osgi;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
13 import javax.annotation.concurrent.GuardedBy;
15 public class YangStoreServiceImpl implements YangStoreService {
16 private final SchemaContextProvider service;
18 private YangStoreSnapshotImpl cache = null;
20 public YangStoreServiceImpl(SchemaContextProvider service) {
21 this.service = service;
25 public synchronized YangStoreSnapshotImpl getYangStoreSnapshot() throws YangStoreException {
27 cache = new YangStoreSnapshotImpl(service.getSchemaContext());
33 * Called when schema context changes, invalidates cache.
35 public synchronized void refresh() {