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;
12 import javax.management.ObjectName;
13 import org.opendaylight.controller.config.api.jmx.CommitStatus;
14 import org.opendaylight.controller.config.api.jmx.constants.ConfigRegistryConstants;
17 * Provides functionality for working with configuration registry - mainly
18 * creating and committing config transactions.
20 public interface ConfigRegistry extends LookupRegistry, ServiceReferenceReadableRegistry {
23 * Only well-known ObjectName in configuration system, under which
24 * ConfigRegisry is registered.
26 public static final ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
29 * Opens new configuration transaction.
31 * @return {@link ObjectName} of {@link ConfigTransactionControllerMXBean}
33 ObjectName beginConfig();
36 * Verifies and commits transaction.
38 * @param transactionControllerON
39 * {@link ObjectName} of
40 * {@link ConfigTransactionControllerMXBean} that was received in
41 * {@link #beginConfig()} method call.
42 * @return CommitStatus
43 * @throws ValidationException
45 * @throws ConflictingVersionException
46 * if configuration state was changed
48 CommitStatus commitConfig(ObjectName transactionControllerON)
49 throws ConflictingVersionException, ValidationException;
52 * @return list of open configuration transactions.
54 List<ObjectName> getOpenConfigs();
57 * Will return true unless there was a transaction that succeeded during
58 * validation but failed in second phase of commit. In this case the server
59 * is unstable and its state is undefined.
64 * @return module factory names available in the system
66 Set<String> getAvailableModuleNames();
71 * Find all runtime beans
75 Set<ObjectName> lookupRuntimeBeans();
78 * Find all runtime of specified module
86 Set<ObjectName> lookupRuntimeBeans(String moduleName, String instanceName);