All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lone.common.core.cache.Cache Maven / Gradle / Ivy

The newest version!
package com.lone.common.core.cache;

/**
 * 系统缓存接口,
 * 提供concurrentlinkedhashmap、ehache、memcached实现
 * 
 */
public interface Cache {
	public static final String CACHE_FOR_FLOW ="prodef-";
	public static final String CACHE_ALLPRODEF ="prodef-all-";
	
	/**
	 * 添加缓存数据
	 * 
	 * @param key
	 * @param value
	 */
	void putItem(String key, Object value);

	/**
	 * 获取缓存数据
	 * 
	 * @param key
	 * @return
	 */
	Object getItem(String key);
	
	/**
	 * 删除缓存数据,并返回删除的数据
	 * 
	 * @param key
	 * @return
	 */
	Object removeItem(String key);
	
	/**
	 * 删除缓存数据
	 * 
	 * @param key
	 * @return
	 */
	void cleanItem(String key);
	
	/**
	 * 删除所有缓存数据
	 */
	void removeAll();
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy