⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 applicationpoolsingleton.java

📁 羽量级数据持久层开发框架
💻 JAVA
字号:
package org.speedframework.pool;

//~--- non-JDK imports --------------------------------------------------------

import org.speedframework.application.IApplication;

//~--- JDK imports ------------------------------------------------------------

import java.util.Hashtable;

/**
 *  类描述信息,描述类的主要职责和用处。
 *
 *
 * @version    $LastChangedRevision: 1945 $, 2007.09.29 at 02:14:20 CST
 * @author     <a href="mailto:falcon8848@gmail.com">piginzoo </a>
 */
public class ApplicationPoolSingleton implements IApplicationPool
 {

    /** 属性描述信息 */
    private static Hashtable applicationpool = new Hashtable();

    // private static Hashtable datebasepool=new Hashtable();

    /** 属性描述信息 */
    private static ApplicationPoolSingleton single = null;

    /**
     * Constructs ...
     *
     */
    private ApplicationPoolSingleton() {}

    /**
     * 方法描述信息,
     * 描述方法是做什么的,
     * 如何调用,最好给出调用代码示例。
     *
     * @return
     */
    public static ApplicationPoolSingleton getInstance() {
        if (single == null) {
            single = new ApplicationPoolSingleton();
        }

        return single;
    }

    /**
     * 方法描述信息,
     * 描述方法是做什么的,
     * 如何调用,最好给出调用代码示例。
     *
     * @param applicationID
     *
     * @return
     */
    public IApplication get(String applicationID) {
        return (IApplication) applicationpool.get(applicationID);
    }

    /**
     * 方法描述信息,
     * 描述方法是做什么的,
     * 如何调用,最好给出调用代码示例。
     *
     * @param applicationID
     * @param application
     */
    public void put(String applicationID, IApplication application) {
        applicationpool.put(applicationID, application);
    }

    /**
     * 方法描述信息,
     * 描述方法是做什么的,
     * 如何调用,最好给出调用代码示例。
     *
     * @return
     */
    public String getStats() {
        return applicationpool.toString();
    }

    /**
     * 方法描述信息,
     * 描述方法是做什么的,
     * 如何调用,最好给出调用代码示例。
     *
     * @return
     */
    public Hashtable getAll() {
        return applicationpool;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -