org.hibernate.cfg.Settings.getCacheProvider()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.hibernate.cfg.Settings.getCacheProvider()方法的一些代码示例,展示了Settings.getCacheProvider()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Settings.getCacheProvider()方法的具体详情如下:
包路径:org.hibernate.cfg.Settings
类名称:Settings
方法名:getCacheProvider

Settings.getCacheProvider介绍

暂无

代码示例

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public UpdateTimestampsCache(Settings settings, Properties props) throws HibernateException {
  String prefix = settings.getCacheRegionPrefix();
  regionName = prefix == null ? REGION_NAME : prefix + '.' + REGION_NAME;
  log.info( "starting update timestamps cache at region: " + regionName );
  this.updateTimestamps = settings.getCacheProvider().buildCache( regionName, props );
}

代码示例来源:origin: hibernate/hibernate

public StandardQueryCache(
    final Settings settings, 
    final Properties props, 
    final UpdateTimestampsCache updateTimestampsCache, 
    String regionName)
throws HibernateException {
  
  if (regionName==null) regionName = StandardQueryCache.class.getName();
  String prefix = settings.getCacheRegionPrefix();
  if (prefix!=null) regionName = prefix + '.' + regionName;
  
  log.info("starting query cache at region: " + regionName);
  
  this.queryCache = settings.getCacheProvider().buildCache(regionName, props);
  this.updateTimestampsCache = updateTimestampsCache;
  this.regionName = regionName;
}

代码示例来源:origin: hibernate/hibernate

public UpdateTimestampsCache(Settings settings, Properties props) 
throws HibernateException {
  String prefix = settings.getCacheRegionPrefix();
  
  regionName = prefix==null ? 
      REGION_NAME : 
      prefix + '.' + REGION_NAME;
  log.info("starting update timestamps cache at region: " + regionName);
  this.updateTimestamps = settings.getCacheProvider().buildCache(regionName, props);
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public StandardQueryCache(
    final Settings settings, 
    final Properties props, 
    final UpdateTimestampsCache updateTimestampsCache, 
    String regionName) throws HibernateException {
  if ( regionName == null ) {
    regionName = StandardQueryCache.class.getName();
  }
  String prefix = settings.getCacheRegionPrefix();
  if ( prefix != null ) {
    regionName = prefix + '.' + regionName;
  }
  log.info( "starting query cache at region: " + regionName );
  this.queryCache = settings.getCacheProvider().buildCache(regionName, props);
  this.updateTimestampsCache = updateTimestampsCache;
  this.regionName = regionName;
}

代码示例来源:origin: hibernate/hibernate

public org.hibernate.classic.Session openSession(Interceptor sessionLocalInterceptor) 
throws HibernateException {
  // note that this timestamp is not correct if the connection provider
  // returns an older JDBC connection that was associated with a
  // transaction that was already begun before openSession() was called
  // (don't know any possible solution to this!)
  long timestamp = settings.getCacheProvider().nextTimestamp();
  return openSession( null, true, timestamp, sessionLocalInterceptor );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public org.hibernate.classic.Session openTemporarySession() throws HibernateException {
  return new SessionImpl(
      null,
      this,
      true,
      settings.getCacheProvider().nextTimestamp(),
      interceptor,
      settings.getDefaultEntityMode(),
      false,
      false,
      ConnectionReleaseMode.AFTER_STATEMENT
    );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public org.hibernate.classic.Session openSession(Interceptor sessionLocalInterceptor)
throws HibernateException {
  // note that this timestamp is not correct if the connection provider
  // returns an older JDBC connection that was associated with a
  // transaction that was already begun before openSession() was called
  // (don't know any possible solution to this!)
  long timestamp = settings.getCacheProvider().nextTimestamp();
  return openSession( null, true, timestamp, sessionLocalInterceptor );
}

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public org.hibernate.classic.Session openSession(
    final Connection connection,
    final boolean flushBeforeCompletionEnabled,
    final boolean autoCloseSessionEnabled,
    final ConnectionReleaseMode connectionReleaseMode) throws HibernateException {
  return new SessionImpl(
      connection,
      this,
      true,
      settings.getCacheProvider().nextTimestamp(),
      interceptor,
      settings.getDefaultEntityMode(),
      flushBeforeCompletionEnabled,
      autoCloseSessionEnabled,
      connectionReleaseMode
    );
}

代码示例来源:origin: hibernate/hibernate

settings.getCacheProvider().stop();

代码示例来源:origin: hibernate/hibernate

impl = settings.getCacheProvider().buildCache(regionName, properties);

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

impl = settings.getCacheProvider().buildCache(regionName, properties);

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

settings.getCacheProvider().stop();

代码示例来源:origin: hibernate/hibernate

this,
true,
settings.getCacheProvider().nextTimestamp(),
interceptor,
sessionEventListenerConfig,

代码示例来源:origin: hibernate/hibernate

settings.getCacheProvider().start( properties );

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

settings.getCacheProvider().start( properties );

代码示例来源:origin: hibernate/hibernate

Environment.USE_MINIMAL_PUTS, properties, settings.getCacheProvider().isMinimalPutsEnabledByDefault() 
);
log.info( "Optimize cache for minimal puts: " + enabledDisabled(useMinimalPuts) );

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

Environment.USE_MINIMAL_PUTS, properties, settings.getCacheProvider().isMinimalPutsEnabledByDefault() 
);
log.info( "Optimize cache for minimal puts: " + enabledDisabled(useMinimalPuts) );

相关文章

Settings类方法