com.holmos.cache.store.impl.MemoryCacheStore Maven / Gradle / Ivy
package com.holmos.cache.store.impl;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import com.holmos.cache.cache.AbstractCache;
import com.holmos.cache.config.MemoryCacheConfigComponent;
import com.holmos.cache.element.Element;
import com.holmos.cache.exception.CacheException;
import com.holmos.cache.outpolicy.CacheOutPolicy;
import com.holmos.cache.status.CacheStatus;
/**
* JVM 内部内存存储器
*
* @author: 吴银龙([email protected])
* @version: 2013-3-19 下午12:55:49
*/
public class MemoryCacheStore extends AbstractCacheStore{
public MemoryCacheStore(MemoryCacheConfigComponent configComponent) {
super(configComponent);
initializeStore();
}
/**
* 初始化存储器的map存储结构
* */
private void initializeStore() {
MemoryCacheConfigComponent config = (MemoryCacheConfigComponent) configComponent;
cacheStore = new ConcurrentHashMap