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.config.facade.xml;
12 import javax.management.ObjectName;
13 import org.opendaylight.controller.config.facade.xml.transactions.TransactionProvider;
14 import org.opendaylight.controller.config.util.ConfigRegistryClient;
15 import org.opendaylight.controller.config.util.ConfigTransactionClient;
17 public class CandidateDatastoreQueryStrategy implements DatastoreQueryStrategy {
19 private final TransactionProvider transactionProvider;
21 public CandidateDatastoreQueryStrategy(final TransactionProvider transactionProvider) {
22 this.transactionProvider = transactionProvider;
26 public Set<ObjectName> queryInstances(final ConfigRegistryClient configRegistryClient) {
27 ObjectName on = transactionProvider.getOrCreateTransaction();
28 ConfigTransactionClient proxy = configRegistryClient.getConfigTransactionClient(on);
29 return proxy.lookupConfigBeans();