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
8 package org.opendaylight.controller.config.api;
10 import java.util.List;
13 import javax.management.ObjectName;
15 import org.opendaylight.controller.config.api.jmx.CommitStatus;
16 import org.opendaylight.controller.config.api.jmx.constants.ConfigRegistryConstants;
19 * Provides functionality for working with configuration registry - mainly
20 * creating and committing config transactions.
22 public interface ConfigRegistry extends LookupRegistry, ServiceReferenceReadableRegistry {
25 * Only well-known ObjectName in configuration system, under which
26 * ConfigRegisry is registered.
28 public static final ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
31 * Opens new configuration transaction.
33 * @return {@link ObjectName} of {@link ConfigTransactionControllerMXBean}
35 ObjectName beginConfig();
38 * Verifies and commits transaction.
40 * @param transactionControllerON
41 * {@link ObjectName} of
42 * {@link ConfigTransactionControllerMXBean} that was received in
43 * {@link #beginConfig()} method call.
44 * @return CommitStatus
45 * @throws ValidationException
47 * @throws ConflictingVersionException
48 * if configuration state was changed
50 CommitStatus commitConfig(ObjectName transactionControllerON)
51 throws ConflictingVersionException, ValidationException;
54 * @return list of open configuration transactions.
56 List<ObjectName> getOpenConfigs();
59 * Will return true unless there was a transaction that succeeded during
60 * validation but failed in second phase of commit. In this case the server
61 * is unstable and its state is undefined.
66 * @return module factory names available in the system
68 Set<String> getAvailableModuleNames();
73 * Find all runtime beans
77 Set<ObjectName> lookupRuntimeBeans();
80 * Find all runtime of specified module
88 Set<ObjectName> lookupRuntimeBeans(String moduleName, String instanceName);