abstract class AbstractEhcacheProvider
extends java.lang.Object
implements org.hibernate.cache.CacheProvider
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
protected CacheManager |
manager
CacheManager instance that creates/builds Cache instances for this provider.
|
Constructor and Description |
---|
AbstractEhcacheProvider() |
Modifier and Type | Method and Description |
---|---|
org.hibernate.cache.Cache |
buildCache(java.lang.String name,
java.util.Properties properties)
Builds a Cache.
|
boolean |
isMinimalPutsEnabledByDefault()
Whether to optimize for minimals puts or minimal gets.
|
protected java.net.URL |
loadResource(java.lang.String configurationResourceName)
Load the supplied resource from the classpath.
|
long |
nextTimestamp()
Returns the next timestamp.
|
private static final org.slf4j.Logger LOG
protected volatile CacheManager manager
public final org.hibernate.cache.Cache buildCache(java.lang.String name, java.util.Properties properties) throws org.hibernate.cache.CacheException
buildCache
in interface org.hibernate.cache.CacheProvider
name
- the name of the cache. Must match a cache configured in ehcache.xmlproperties
- not usedorg.hibernate.cache.CacheException
- inter alia, if a cache of the same name already existspublic final long nextTimestamp()
nextTimestamp
in interface org.hibernate.cache.CacheProvider
public final boolean isMinimalPutsEnabledByDefault()
Indicates whether when operating in non-strict read/write or read-only mode Hibernate should optimize the access patterns for minimal puts or minimal gets. In Ehcache we default to minimal puts since this should have minimal to no affect on unclustered users, and has great benefit for clustered users.
This setting can be overridden by setting the "hibernate.cache.use_minimal_puts" property in the Hibernate configuration.
isMinimalPutsEnabledByDefault
in interface org.hibernate.cache.CacheProvider
protected java.net.URL loadResource(java.lang.String configurationResourceName)