2 * Copyright (c) 2013, 2017 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 * ConfigRegistry is registered.
26 ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
27 ObjectName OBJECT_NAME_NO_NOTIFICATIONS = ConfigRegistryConstants.OBJECT_NAME_NO_NOTIFICATIONS;
30 * Opens new configuration transaction.
32 * @return {@link ObjectName} of
33 * {@link org.opendaylight.controller.config.api.jmx.ConfigTransactionControllerMXBean}
35 ObjectName beginConfig();
38 * Verifies and commits transaction.
40 * @param transactionControllerON
41 * {@link ObjectName} of
42 * {@link org.opendaylight.controller.config.api.jmx.ConfigTransactionControllerMXBean}
43 * that was received in {@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 * List of open configuration transactions.
56 * @return list of open configuration transactions.
58 List<ObjectName> getOpenConfigs();
61 * Will return true unless there was a transaction that succeeded during
62 * validation but failed in second phase of commit. In this case the server is
63 * unstable and its state is undefined.
68 * Get the module names available in the system.
70 * @return module factory names available in the system
72 Set<String> getAvailableModuleNames();