X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2FConfigTransactionControllerInternal.java;h=5b7ecb938c2a771c177dd4e39c925200cb41115e;hp=30183ebff30547a3b2f164aa9cb0df476b4f9a40;hb=f43b01b81319959b1907e3e04537f5169e7f33d8;hpb=4497e2212e73e13356447b9644bbdc935411949a diff --git a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerInternal.java b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerInternal.java index 30183ebff3..5b7ecb938c 100644 --- a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerInternal.java +++ b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerInternal.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, @@ -19,50 +19,53 @@ import org.osgi.framework.BundleContext; * Defines contract between {@link ConfigTransactionControllerImpl} (producer) * and {@link ConfigRegistryImpl} (consumer). */ -interface ConfigTransactionControllerInternal extends - ConfigTransactionControllerImplMXBean, AutoCloseable { - - +interface ConfigTransactionControllerInternal extends ConfigTransactionControllerImplMXBean, AutoCloseable { /** - * 1, Copy already committed modules to current transaction. - * 2, Diff: compute added and removed factories from last run, then create new modules using - * {@link org.opendaylight.controller.config.spi.ModuleFactory#getDefaultModules(org.opendaylight.controller.config.api.DependencyResolverFactory)} + * 1, Copy already committed modules to current transaction. 2, Diff: compute + * added and removed factories from last run, then create new modules using + * {@link org.opendaylight.controller.config.spi + * .ModuleFactory#getDefaultModules(org.opendaylight.controller + * .config .api.DependencyResolverFactory, BundleContext)} * and remove modules belonging to removed factories. + * + * @param entries + * entries + * @param lastListOfFactories + * list of factories */ - void copyExistingModulesAndProcessFactoryDiff(Collection entries, List lastListOfFactories); + void copyExistingModulesAndProcessFactoryDiff(Collection entries, + List lastListOfFactories); /** - * Call {@link org.opendaylight.controller.config.spi.Module#validate()} on - * all beans in transaction. Lock transaction after successful validation. - * This method can be called multiple times if validation fails, but cannot - * be called after it did not throw exception. + * Call {@link org.opendaylight.controller.config.spi.Module#validate()} on all + * beans in transaction. Lock transaction after successful validation. This + * method can be called multiple times if validation fails, but cannot be called + * after it did not throw exception. * - * @throws {@link RuntimeException} if validation fails. It is safe to run - * this method in future - * @return CommitInfo + * @return CommitInfo commit info */ - CommitInfo validateBeforeCommitAndLockTransaction() - throws ValidationException; + CommitInfo validateBeforeCommitAndLockTransaction() throws ValidationException; /** - * Call {@link org.opendaylight.controller.config.spi.Module#getInstance()} - * on all beans in transaction. This method can be only called once. + * Call {@link org.opendaylight.controller.config.spi.Module#getInstance()} on + * all beans in transaction. This method can be only called once. * - * @throws {@link RuntimeException} commit fails, indicates bug in config - * bean - * @return ordered list of module identifiers that respects dependency - * order. + * @return ordered list of module identifiers that respects dependency order */ List secondPhaseCommit(); /** - * @return ObjectName of this transaction controller + * Gets the objectName of this transaction controller. + * + * @return ObjectName */ ObjectName getControllerObjectName(); /** - * @return true iif transaction was committed or aborted. + * Check if the transaction was committed or aborted. + * + * @return result of transaction */ boolean isClosed(); @@ -70,7 +73,7 @@ interface ConfigTransactionControllerInternal extends BundleContext getModuleFactoryBundleContext(String factoryName); - SearchableServiceReferenceWritableRegistry getWritableRegistry(); + SearchableServiceReferenceWritableRegistry getWritableRegistry(); TransactionIdentifier getTransactionIdentifier();