|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.hibernate.SingletonEhCacheRegionFactory
public class SingletonEhCacheRegionFactory
A singleton EhCacheRegionFactory implementation.
Field Summary | |
---|---|
protected CacheManager |
manager
Ehcache CacheManager that supplied Ehcache instances for this Hibernate RegionFactory. |
protected ProviderMBeanRegistrationHelper |
mbeanRegistrationHelper
MBean registration helper class instance for Ehcache Hibernate MBeans. |
static java.lang.String |
NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME
The Hibernate system property specifying the location of the ehcache configuration file name. |
static java.lang.String |
NET_SF_EHCACHE_ONE_PHASE_SYNC
Simply register with the XA Transaction, do not really participate in it |
protected org.hibernate.cfg.Settings |
settings
Settings object for the Hibernate persistence unit. |
Constructor Summary | |
---|---|
SingletonEhCacheRegionFactory(java.util.Properties prop)
Returns a representation of the singleton EhCacheRegionFactory |
Method Summary | |
---|---|
org.hibernate.cache.CollectionRegion |
buildCollectionRegion(java.lang.String regionName,
java.util.Properties properties,
org.hibernate.cache.CacheDataDescription metadata)
|
org.hibernate.cache.EntityRegion |
buildEntityRegion(java.lang.String regionName,
java.util.Properties properties,
org.hibernate.cache.CacheDataDescription metadata)
|
org.hibernate.cache.QueryResultsRegion |
buildQueryResultsRegion(java.lang.String regionName,
java.util.Properties properties)
|
org.hibernate.cache.TimestampsRegion |
buildTimestampsRegion(java.lang.String regionName,
java.util.Properties properties)
|
org.hibernate.cache.access.AccessType |
getDefaultAccessType()
Default access-type used when the configured using JPA 2.0 config. |
protected java.lang.Object |
getOnePhaseCommitSyncTransactionManager(org.hibernate.cfg.Settings settings,
java.util.Properties properties)
Based on the configuration, this might return a decorated SyncTransactionManager |
boolean |
isMinimalPutsEnabledByDefault()
Whether to optimize for minimals puts or minimal gets. |
protected static java.net.URL |
loadResource(java.lang.String configurationResourceName)
Load a resource from the classpath. |
long |
nextTimestamp()
|
void |
start(org.hibernate.cfg.Settings settings,
java.util.Properties properties)
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME
public static final java.lang.String NET_SF_EHCACHE_ONE_PHASE_SYNC
protected final ProviderMBeanRegistrationHelper mbeanRegistrationHelper
protected volatile CacheManager manager
protected org.hibernate.cfg.Settings settings
Constructor Detail |
---|
public SingletonEhCacheRegionFactory(java.util.Properties prop)
Method Detail |
---|
public void start(org.hibernate.cfg.Settings settings, java.util.Properties properties) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheException
public void stop()
public 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.RegionFactory
public long nextTimestamp()
nextTimestamp
in interface org.hibernate.cache.RegionFactory
public org.hibernate.cache.EntityRegion buildEntityRegion(java.lang.String regionName, java.util.Properties properties, org.hibernate.cache.CacheDataDescription metadata) throws org.hibernate.cache.CacheException
buildEntityRegion
in interface org.hibernate.cache.RegionFactory
org.hibernate.cache.CacheException
public org.hibernate.cache.CollectionRegion buildCollectionRegion(java.lang.String regionName, java.util.Properties properties, org.hibernate.cache.CacheDataDescription metadata) throws org.hibernate.cache.CacheException
buildCollectionRegion
in interface org.hibernate.cache.RegionFactory
org.hibernate.cache.CacheException
public org.hibernate.cache.QueryResultsRegion buildQueryResultsRegion(java.lang.String regionName, java.util.Properties properties) throws org.hibernate.cache.CacheException
buildQueryResultsRegion
in interface org.hibernate.cache.RegionFactory
org.hibernate.cache.CacheException
public org.hibernate.cache.TimestampsRegion buildTimestampsRegion(java.lang.String regionName, java.util.Properties properties) throws org.hibernate.cache.CacheException
buildTimestampsRegion
in interface org.hibernate.cache.RegionFactory
org.hibernate.cache.CacheException
protected static java.net.URL loadResource(java.lang.String configurationResourceName)
public org.hibernate.cache.access.AccessType getDefaultAccessType()
@Cacheable(true)
to be attached to an
entity without any access type or usage qualification.
We are conservative here in specifying AccessType.READ_WRITE
so as to follow the mantra of "do no harm".
This is a Hibernate 3.5 method.
getDefaultAccessType
in interface org.hibernate.cache.RegionFactory
protected java.lang.Object getOnePhaseCommitSyncTransactionManager(org.hibernate.cfg.Settings settings, java.util.Properties properties)
settings
- the Hibernate settings net.sf.ehcache.hibernate.AbstractEhcacheRegionFactory.NET_SF_EHCACHE_ONE_PHASE_SYNCproperties
- the Hibernate config props
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |