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

com.holmos.cache.config.parser.AbstractParser Maven / Gradle / Ivy

The newest version!
package com.holmos.cache.config.parser;

import com.holmos.cache.config.CacheConfig;
import com.holmos.cache.config.CacheConfigComponent;

/**
 * Watsen 平台的配置解析器接口,通过扩展可以实现对不同文件格式的解析,该平台实现properties和xml文件的解析
 * 
 * @author 吴银龙([email protected])
 * 
 * */
public abstract class AbstractParser {
	
	protected static String name="cache.names";
	protected static String maxSize="maxSize";
	protected static String outPolicyType="outPolicyType";
	protected static String type="type";
	protected static String updateInterval="updateInterval";
	protected static String liveTime="liveTime";
	
	protected CacheConfig cacheConfig;
	public AbstractParser(){
		
	}
	/**
	 * 将配置文件中名字为cacheName的缓存配置解析成{@link CacheConfigComponent}
	 * 
	 * @param cacheName 要解析的缓存组件名字
	 * @return 解析生成的{@link CacheConfigComponent}对象
	 * */
	public abstract CacheConfigComponent parser(String cacheName);
	
	/**
	 * 解析配置文件中所有的缓存信息
	 * 
	 * @return 返回配置文件中所有的缓存配置信息
	 * 
	 * */
	public abstract CacheConfig parser();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy