当前位置: 首页>>代码示例>>Java>>正文


Java DestroyedModule.close方法代码示例

本文整理汇总了Java中org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule.close方法的典型用法代码示例。如果您正苦于以下问题:Java DestroyedModule.close方法的具体用法?Java DestroyedModule.close怎么用?Java DestroyedModule.close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule的用法示例。


在下文中一共展示了DestroyedModule.close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: close

import org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule; //导入方法依赖的package包/类
/**
 * Abort open transactions and unregister read only modules. Since this class is
 * not responsible for registering itself under
 * {@link org.opendaylight.controller.config.api.ConfigRegistry#OBJECT_NAME}, it
 * will not unregister itself here.
 */
@Override
public void close() {
    if (!closed.compareAndSet(false, true)) {
        return;
    }

    // abort transactions
    Map<String, Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>> transactions =
            transactionsHolder.getCurrentTransactions();
    for (Entry<ConfigTransactionControllerInternal, ConfigTransactionLookupRegistry>
        configTransactionControllerEntry : transactions.values()) {
        ConfigTransactionControllerInternal configTransactionController = configTransactionControllerEntry.getKey();
        configTransactionControllerEntry.getValue().close();
        configTransactionController.abortConfig();
    }

    // destroy all live objects one after another in order of the dependency
    // hierarchy, from top to bottom
    List<DestroyedModule> destroyedModules = currentConfig.getModulesToBeDestroyed();

    LOG.info("ConfigRegistry closing - destroying {} modules", destroyedModules.size());

    for (DestroyedModule destroyedModule : destroyedModules) {
        destroyedModule.close();
    }
    // unregister MBeans that failed to unregister properly
    baseJMXRegistrator.close();
    // remove jmx servers
    MBeanServerFactory.releaseMBeanServer(registryMBeanServer);
    MBeanServerFactory.releaseMBeanServer(transactionsMBeanServer);

    LOG.info("ConfigRegistry closed");
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:40,代码来源:ConfigRegistryImpl.java


注:本文中的org.opendaylight.controller.config.manager.impl.dependencyresolver.DestroyedModule.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。