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;
27 public static final ObjectName OBJECT_NAME_NO_NOTIFICATIONS = ConfigRegistryConstants.OBJECT_NAME_NO_NOTIFICATIONS;
30 * Opens new configuration transaction.
32 * @return {@link ObjectName} of {@link ConfigTransactionControllerMXBean}
34 ObjectName beginConfig();
37 * Verifies and commits transaction.
39 * @param transactionControllerON
40 * {@link ObjectName} of
41 * {@link ConfigTransactionControllerMXBean} that was received in
42 * {@link #beginConfig()} method call.
43 * @return CommitStatus
44 * @throws ValidationException
46 * @throws ConflictingVersionException
47 * if configuration state was changed
49 CommitStatus commitConfig(ObjectName transactionControllerON)
50 throws ConflictingVersionException, ValidationException;
53 * @return list of open configuration transactions.
55 List<ObjectName> getOpenConfigs();
58 * Will return true unless there was a transaction that succeeded during
59 * validation but failed in second phase of commit. In this case the server
60 * is unstable and its state is undefined.
65 * @return module factory names available in the system
67 Set<String> getAvailableModuleNames();