yqwcache.java

来自「野蔷薇论坛源码 java 自己看看吧。 学习用」· Java 代码 · 共 51 行

JAVA
51
字号
/* 
 * Created on 2007-9-22
 * Last modified on 2007-9-22
 * Powered by YeQiangWei.com
 */
package com.yeqiangwei.club.cache.singleton;

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

import com.yeqiangwei.club.cache.Cache;
import com.yeqiangwei.club.cache.CacheException;
import com.yeqiangwei.club.cache.CacheProvider;

public class YQWcache implements CacheProvider{

	public Cache buildCache(String name) throws CacheException {
		return null;
	}

	public boolean isMinimalPutsEnabledByDefault() {
		return false;
	}

	public void start() throws CacheException {
	}

	public long nextTimestamp() {
		return 0;
	}

	public void stop() {
	}

	public String[] getCacheNames() {
		Map<String, Map> map = CacheImpl.CACHES;
		String[] names = new String[map.size()];
		Iterator iterator = map.keySet().iterator();
		int i = 0;
		while(iterator.hasNext()){
			names[i] = iterator.next().toString();
			i++;
		}
		return names;
	}

	public Cache getCache(String name) {
		return CacheFactory.creator(name);
	}
}

⌨️ 快捷键说明

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