1 5 package com.whirlycott.cache.hibernate; 6 7 import java.util.Properties ; 8 9 import org.apache.commons.logging.Log; 10 import org.apache.commons.logging.LogFactory; 11 12 import com.whirlycott.cache.Messages; 13 14 import net.sf.hibernate.cache.Cache; 15 import net.sf.hibernate.cache.CacheException; 16 import net.sf.hibernate.cache.CacheProvider; 17 import net.sf.hibernate.cache.Timestamper; 18 19 23 public class WhirlycacheProvider implements CacheProvider { 24 25 28 private static final Log log = LogFactory.getLog(WhirlycacheProvider.class); 29 30 36 public Cache buildCache(final String _name, final Properties _props) throws CacheException { 37 log.debug(Messages.getString("WhirlycacheProvider.building_cache") + _name); return new WhirlycachePlugin(_name); 39 } 40 41 46 public long nextTimestamp() { 47 return Timestamper.next(); 48 } 49 50 } 51 52 | Popular Tags |