AbstractCacheAbleService.java 554 Bytes
package com.yoho.search.cache.beans;

import javax.annotation.PostConstruct;

import com.yoho.search.cache.model.SearchCache;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class AbstractCacheAbleService {
	
	@Autowired
	protected SearchCacheService searchCacheService;
	@Autowired
	protected SearchCacheFactory searchCacheFactory;
	
	protected SearchCache searchCache;
	
	public abstract SearchCache getSearchCache();
	
	@PostConstruct
	void init(){
		this.searchCache = getSearchCache();
	}
	
}