Search in sources :

Example 1 with AbstractModule

use of org.opendaylight.controller.config.spi.AbstractModule in project controller by opendaylight.

the class ConfigTransactionControllerImpl method reCreateModule.

@Override
public synchronized void reCreateModule(final ObjectName objectName) throws InstanceNotFoundException {
    transactionStatus.checkNotCommitStarted();
    transactionStatus.checkNotAborted();
    checkTransactionName(objectName);
    ObjectNameUtil.checkDomain(objectName);
    ModuleIdentifier moduleIdentifier = ObjectNameUtil.fromON(objectName, ObjectNameUtil.TYPE_MODULE);
    ModuleInternalTransactionalInfo txInfo = dependencyResolverManager.findModuleInternalTransactionalInfo(moduleIdentifier);
    Module realModule = txInfo.getRealModule();
    if (realModule instanceof AbstractModule) {
        ((AbstractModule<?>) realModule).setCanReuseInstance(false);
    }
}
Also used : ModuleIdentifier(org.opendaylight.controller.config.api.ModuleIdentifier) ModuleInternalTransactionalInfo(org.opendaylight.controller.config.manager.impl.dependencyresolver.ModuleInternalTransactionalInfo) AbstractModule(org.opendaylight.controller.config.spi.AbstractModule) Module(org.opendaylight.controller.config.spi.Module) AbstractModule(org.opendaylight.controller.config.spi.AbstractModule)

Aggregations

ModuleIdentifier (org.opendaylight.controller.config.api.ModuleIdentifier)1 ModuleInternalTransactionalInfo (org.opendaylight.controller.config.manager.impl.dependencyresolver.ModuleInternalTransactionalInfo)1 AbstractModule (org.opendaylight.controller.config.spi.AbstractModule)1 Module (org.opendaylight.controller.config.spi.Module)1