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.ConfigTransactionControllerMXBean;
17 import org.opendaylight.controller.config.api.jmx.constants.ConfigRegistryConstants;
20 * Provides functionality for working with configuration registry - mainly
21 * creating and committing config transactions.
23 public interface ConfigRegistry extends LookupRegistry {
26 * Only well-known ObjectName in configuration system, under which
27 * ConfigRegisry is registered.
29 public static final ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
32 * Opens new configuration transaction.
34 * @return {@link ObjectName} of {@link ConfigTransactionControllerMXBean}
36 ObjectName beginConfig();
39 * Verifies and commits transaction.
41 * @param transactionControllerON
42 * {@link ObjectName} of
43 * {@link ConfigTransactionControllerMXBean} that was received in
44 * {@link #beginConfig()} method call.
45 * @return CommitStatus
46 * @throws ValidationException
48 * @throws ConflictingVersionException
49 * if configuration state was changed
51 CommitStatus commitConfig(ObjectName transactionControllerON)
52 throws ConflictingVersionException, ValidationException;
55 * @return list of open configuration transactions.
57 List<ObjectName> getOpenConfigs();
60 * Will return true unless there was a transaction that succeeded during
61 * validation but failed in second phase of commit. In this case the server
62 * is unstable and its state is undefined.
66 Set<String> getAvailableModuleNames();
69 * Find all runtime beans
73 Set<ObjectName> lookupRuntimeBeans();
76 * Find all runtime of specified module
84 Set<ObjectName> lookupRuntimeBeans(String moduleName, String instanceName);