• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DisposableUtil类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.lastaflute.di.DisposableUtil的典型用法代码示例。如果您正苦于以下问题:Java DisposableUtil类的具体用法?Java DisposableUtil怎么用?Java DisposableUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DisposableUtil类属于org.lastaflute.di包,在下文中一共展示了DisposableUtil类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configure

点赞 3

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public static synchronized void configure(String configFile) {
    if (configuring) {
        return;
    }
    configuring = true;
    initializeDefaultProviderIfNeeds();
    initializeDefaultBuilderIfNeeds();
    if (LdiResourceUtil.isExist(configFile)) {
        doConfigure(configFile);
    }
    DisposableUtil.add(new Disposable() {
        public void dispose() {
            LaContainerFactory.destroy();
        }
    });
    configuring = false;
    initialized = true;
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:19,
代码来源:LaContainerFactory.java

示例2: initialize

点赞 3

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public static void initialize() {
    if (initialized) {
        return;
    }
    loadDefaultComponentDefBuilder();
    loadDefaultPropertyDefBuilder();
    loadDefaultAspectDefBuilder();
    loadDefaultIntertypeDefBuilder();
    loadDefaultInitMethodDefBuilder();
    loadDefaultDestroyMethodDefBuilder();
    DisposableUtil.add(new Disposable() {

        public void dispose() {
            TigerAnnotationHandler.dispose();
        }
    });
    initialized = true;
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:19,
代码来源:TigerAnnotationHandler.java

示例3: toBeDisposable

点赞 3

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
/** {@inheritDoc} */
public void toBeDisposable(final DisposableProcess callerProcess) { // for HotDeploy
    if (_disposable) {
        return;
    }
    synchronized (this) {
        if (_disposable) {
            return;
        }
        DisposableUtil.add(new Disposable() {
            public void dispose() {
                callerProcess.dispose();
                _disposable = false;
            }
        });
        DisposableUtil.add(new Disposable() {
            public void dispose() {
                DfBeanDescFactory.clear();
            }
        });
        _disposable = true;
    }
}
 

开发者ID:lastaflute,
项目名称:lastaflute-example-harbor,
代码行数:24,
代码来源:ImplementedInvokerAssistant.java

示例4: loadFacade

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
protected static MessageResourceBundleFacade loadFacade(String path) {
    synchronized (cacheMap) {
        if (!initialized) {
            DisposableUtil.add(new Disposable() {
                public void dispose() {
                    clear();
                    initialized = false;
                }
            });
            initialized = true;
        }
        final Object cachedFacade = cacheMap.get(path);
        if (cachedFacade == NOT_FOUND) {
            return null;
        } else if (cachedFacade != null) {
            return (MessageResourceBundleFacade) cachedFacade;
        }
        final URL url = LdiResourceUtil.getResourceNoException(path);
        if (url != null) {
            final MessageResourceBundleFacade facade = new MessageResourceBundleFacade(url);
            cacheMap.put(path, facade);
            return facade;
        } else {
            cacheMap.put(path, NOT_FOUND);
        }
    }
    return null;
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:29,
代码来源:MessageResourceBundleFactory.java

示例5: initialize

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public static void initialize() {
    DisposableUtil.add(new Disposable() {
        public void dispose() {
            clear();
        }
    });
    initialized = true;
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:9,
代码来源:BeanDescFactory.java

示例6: initialize

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public void initialize() {
    if (!initialized) {
        for (int i = 0; i < rootPackageNames.length; ++i) {
            addExistChecker(rootPackageNames[i]);
        }
        DisposableUtil.add(this);
        initialized = true;
    }
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:10,
代码来源:StyledNamingConvention.java

示例7: destroy

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public static void destroy() {
    if (container == null) {
        return;
    }
    container.destroy();
    container = null;
    DisposableUtil.dispose();
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:9,
代码来源:SingletonLaContainerFactory.java

示例8: initialize

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public static synchronized void initialize() {
    if (!initialized) {
        DisposableUtil.add(new Disposable() {
            public void dispose() {
                synchronized (ClassPoolUtil.class) {
                    classPoolMap.clear();
                    initialized = false;
                }
            }
        });
        initialized = true;
    }
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:14,
代码来源:ClassPoolUtil.java

示例9: initialize

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public void initialize() {
    DisposableUtil.add(this);
    initialized = true;
}
 

开发者ID:lastaflute,
项目名称:lastaflute,
代码行数:5,
代码来源:ObjectiveMessageResources.java

示例10: prepareHotDeploy

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
protected void prepareHotDeploy() { // only unused if cool
    DisposableUtil.add(() -> requestHotDeploy());
    hotDeployRequested = false;
}
 

开发者ID:lastaflute,
项目名称:lastaflute,
代码行数:5,
代码来源:ObjectiveConfig.java

示例11: finish

点赞 2

import org.lastaflute.di.DisposableUtil; //导入依赖的package包/类
public void finish() {
    componentDefCache.clear();
    hotdeployClassLoader = null;
    DisposableUtil.dispose();
}
 

开发者ID:lastaflute,
项目名称:lasta-di,
代码行数:6,
代码来源:HotdeployBehavior.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)