本文整理了Java中org.hibernate.cfg.Settings.isSecondLevelCacheEnabled()
方法的一些代码示例,展示了Settings.isSecondLevelCacheEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.isSecondLevelCacheEnabled()
方法的具体详情如下:
包路径:org.hibernate.cfg.Settings
类名称:Settings
方法名:isSecondLevelCacheEnabled
暂无
代码示例来源:origin: hibernate/hibernate
throws HibernateException {
if ( concurrencyStrategy==null || !settings.isSecondLevelCacheEnabled() ) return null; //no cache
代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all
throws HibernateException {
if ( concurrencyStrategy==null || !settings.isSecondLevelCacheEnabled() ) return null; //no cache
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
if ( accessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
final AccessType accessType = AccessType.fromExternalName( model.getCacheConcurrencyStrategy() );
if ( accessType != null ) {
naturalIdAccessStrategy = ( NaturalIdRegionAccessStrategy ) entityAccessStrategies.get( naturalIdCacheRegionName );
if ( naturalIdAccessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
final NaturalIdRegion naturalIdRegion = settings.getRegionFactory().buildNaturalIdRegion( naturalIdCacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );
naturalIdAccessStrategy = naturalIdRegion.buildAccessStrategy( settings.getRegionFactory().getDefaultAccessType() );
final AccessType accessType = AccessType.fromExternalName( model.getCacheConcurrencyStrategy() );
CollectionRegionAccessStrategy accessStrategy = null;
if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {
if ( LOG.isTraceEnabled() ) {
LOG.tracev("Building cache for collection data [{0}]", model.getRole() );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
if ( accessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
final AccessType accessType = AccessType.fromExternalName( model.getCacheConcurrencyStrategy() );
if ( accessType != null ) {
naturalIdAccessStrategy = ( NaturalIdRegionAccessStrategy ) entityAccessStrategies.get( naturalIdCacheRegionName );
if ( naturalIdAccessStrategy == null && settings.isSecondLevelCacheEnabled() ) {
final NaturalIdRegion naturalIdRegion = settings.getRegionFactory().buildNaturalIdRegion( naturalIdCacheRegionName, properties, CacheDataDescriptionImpl.decode( model ) );
naturalIdAccessStrategy = naturalIdRegion.buildAccessStrategy( settings.getRegionFactory().getDefaultAccessType() );
final AccessType accessType = AccessType.fromExternalName( model.getCacheConcurrencyStrategy() );
CollectionRegionAccessStrategy accessStrategy = null;
if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {
if ( LOG.isTraceEnabled() ) {
LOG.tracev("Building cache for collection data [{0}]", model.getRole() );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
if ( settings.isSecondLevelCacheEnabled() &&
rootEntityBinding.getHierarchyDetails().getCaching() != null &&
model.getHierarchyDetails().getCaching() != null &&
final AccessType accessType = model.getCaching().getAccessType();
CollectionRegionAccessStrategy accessStrategy = null;
if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {
if ( LOG.isTraceEnabled() ) {
LOG.tracev( "Building cache for collection data [{0}]", model.getAttribute().getRole() );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
if ( settings.isSecondLevelCacheEnabled() &&
rootEntityBinding.getHierarchyDetails().getCaching() != null &&
model.getHierarchyDetails().getCaching() != null &&
final AccessType accessType = model.getCaching().getAccessType();
CollectionRegionAccessStrategy accessStrategy = null;
if ( accessType != null && settings.isSecondLevelCacheEnabled() ) {
if ( LOG.isTraceEnabled() ) {
LOG.tracev( "Building cache for collection data [{0}]", model.getAttribute().getRole() );
代码示例来源:origin: org.hibernate/hibernate-jbosscache2
if (settings.isSecondLevelCacheEnabled()) {
代码示例来源:origin: org.hibernate/hibernate-jbosscache
if (settings.isSecondLevelCacheEnabled()) {
代码示例来源:origin: org.hibernate/hibernate-jbosscache2
/**
* {@inheritDoc}
*/
public void start(Settings settings, Properties properties) throws CacheException {
use2ndLevel = settings.isSecondLevelCacheEnabled();
useQuery = settings.isQueryCacheEnabled();
if (cache == null) {
if (channelFactory == null) {
String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
if (muxStacks != null) {
channelFactory = new JChannelFactory();
try {
channelFactory.setMultiplexerConfig(muxStacks);
}
catch (Exception e) {
throw new CacheException("Problem setting ChannelFactory config", e);
}
}
}
cache = createSharedCache(settings, properties);
configureTransactionManager(cache, settings, properties);
if (cache.getConfiguration().getMultiplexerStack() != null
&& cache.getConfiguration().getRuntimeConfig().getMuxChannelFactory() == null) {
cache.getConfiguration().getRuntimeConfig().setMuxChannelFactory(channelFactory);
}
}
cache.start();
}
代码示例来源:origin: org.hibernate/hibernate-jbosscache
use2ndLevel = settings.isSecondLevelCacheEnabled();
useQuery = settings.isQueryCacheEnabled();
内容来源于网络,如有侵权,请联系作者删除!