net.sf.hibernate.cache
Class EhCacheProvider
java.lang.Object
net.sf.hibernate.cache.EhCacheProvider
- All Implemented Interfaces:
- CacheProvider
- public class EhCacheProvider
- extends Object
- implements CacheProvider
Cache Provider plugin for Hibernate
Use hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
in Hibernate 3.x or later
Taken from EhCache 0.9 distribution
- Author:
- Greg Luck, Emmanuel Bernard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EhCacheProvider
public EhCacheProvider()
buildCache
public Cache buildCache(String name,
Properties properties)
throws CacheException
- Builds a Cache.
Even though this method provides properties, they are not used.
Properties for EHCache are specified in the ehcache.xml file.
Configuration will be read from ehcache.xml for a cache declaration
where the name attribute matches the name parameter in this builder.
- Specified by:
buildCache
in interface CacheProvider
- Parameters:
name
- the name of the cache. Must match a cache configured in ehcache.xmlproperties
- not used
- Returns:
- a newly built cache will be built and initialised
- Throws:
CacheException
- inter alia, if a cache of the same name already exists
nextTimestamp
public long nextTimestamp()
- Returns the next timestamp.
- Specified by:
nextTimestamp
in interface CacheProvider