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

📄 defaultcachepool.java

📁 羽量级数据持久层开发框架
💻 JAVA
字号:
// $Id: DefaultCachePool.java $Date: 2007-10-23 17:08:52 $ 
package org.speedframework.cache;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.speedframework.exception.SpeedFrameworkException;

public class DefaultCachePool implements CachePool{
	private static Map cache = null;
	
	public DefaultCachePool(){
		if(cache == null){
			cache = new HashMap();
		}
	}

	public synchronized Object get(Object key) throws SpeedFrameworkException {
		// TODO 自动生成方法存根
		return cache.get(key);
	}

	public synchronized void put(Object key, Object value) throws SpeedFrameworkException {
		// TODO 自动生成方法存根
		cache.put(key,value);
	}

	public synchronized void remove(Object key) throws SpeedFrameworkException {
		// TODO 自动生成方法存根
		cache.remove(key);
	}

	public String getStats() throws SpeedFrameworkException {
		// TODO 自动生成方法存根
		return null;
	}

	public void dispose() {
		// TODO 自动生成方法存根
		Iterator it = cache.keySet().iterator();
		while(it.hasNext()){
			cache.remove(it.next());
		}
		
	}

}

⌨️ 快捷键说明

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