X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fapi%2FConfigTransactionController.java;h=c234da7df590c0743e4be3e3b916a365bc7a59d9;hb=d3d5d329914eddb066680f7e22ce5dd7c09616e7;hp=7e8ee64daa089fec089d8d0d57b31cba364f25c9;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ConfigTransactionController.java b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ConfigTransactionController.java index 7e8ee64daa..c234da7df5 100644 --- a/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ConfigTransactionController.java +++ b/opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ConfigTransactionController.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2013, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -8,7 +8,6 @@ package org.opendaylight.controller.config.api; import java.util.Set; - import javax.management.InstanceAlreadyExistsException; import javax.management.InstanceNotFoundException; import javax.management.ObjectName; @@ -16,19 +15,34 @@ import javax.management.ObjectName; /** * Represents functionality provided by configuration transaction. */ -public interface ConfigTransactionController extends LookupRegistry { +public interface ConfigTransactionController extends LookupRegistry, ServiceReferenceWritableRegistry { /** * Create new configuration bean. * * @param moduleName + * name of the module * @param instanceName + * name of the instance * @return ObjectName of newly created module * @throws InstanceAlreadyExistsException * if given ifcName and instanceName is already registered */ - ObjectName createModule(String moduleName, String instanceName) - throws InstanceAlreadyExistsException; + ObjectName createModule(String moduleName, String instanceName) throws InstanceAlreadyExistsException; + + /** + * Re-creates an existing module configuration bean. + * + * @param objectName + * can be either read-only module name that can be obtained using + * {@link ConfigRegistry#lookupConfigBean(String, String)} or + * writable module name that must contain current transaction name. + * @throws InstanceNotFoundException + * if module is not found + * @throws IllegalArgumentException + * if object name contains wrong transaction name or domain + */ + void reCreateModule(ObjectName objectName) throws InstanceNotFoundException; /** * Destroy existing module. @@ -36,8 +50,7 @@ public interface ConfigTransactionController extends LookupRegistry { * @param objectName * can be either read-only module name that can be obtained using * {@link ConfigRegistry#lookupConfigBean(String, String)} or - * writable module name that must contain current transaction - * name. + * writable module name that must contain current transaction name. * @throws InstanceNotFoundException * if module is not found * @throws IllegalArgumentException @@ -59,11 +72,17 @@ public interface ConfigTransactionController extends LookupRegistry { void validateConfig() throws ValidationException; /** + * Get the name of the transaction. * * @return transactionName */ String getTransactionName(); + /** + * Get the names of all available modules. + * + * @return all known module factory names as reported by + * {@link org.opendaylight.controller.config.spi.ModuleFactory#getImplementationName()} + */ Set getAvailableModuleNames(); - }