本文整理汇总了Java中org.hibernate.cache.spi.Region类的典型用法代码示例。如果您正苦于以下问题:Java Region类的具体用法?Java Region怎么用?Java Region使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Region类属于org.hibernate.cache.spi包,在下文中一共展示了Region类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNaturalIdCacheStatistics
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
@Override
public NaturalIdCacheStatistics getNaturalIdCacheStatistics(String regionName) {
ConcurrentNaturalIdCacheStatisticsImpl nics =
(ConcurrentNaturalIdCacheStatisticsImpl) naturalIdCacheStatistics.get( regionName );
if ( nics == null ) {
if ( sessionFactory == null ) {
return null;
}
Region region = sessionFactory.getNaturalIdCacheRegion( regionName );
if ( region == null ) {
return null;
}
nics = new ConcurrentNaturalIdCacheStatisticsImpl( region );
ConcurrentNaturalIdCacheStatisticsImpl previous;
if ( ( previous = (ConcurrentNaturalIdCacheStatisticsImpl) naturalIdCacheStatistics.putIfAbsent(
regionName, nics
) ) != null ) {
nics = previous;
}
}
return nics;
}
示例2: getSecondLevelCacheStatistics
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
/**
* Second level cache statistics per region
*
* @param regionName region name
*
* @return SecondLevelCacheStatistics
*/
public SecondLevelCacheStatistics getSecondLevelCacheStatistics(String regionName) {
ConcurrentSecondLevelCacheStatisticsImpl slcs
= (ConcurrentSecondLevelCacheStatisticsImpl) secondLevelCacheStatistics.get( regionName );
if ( slcs == null ) {
if ( sessionFactory == null ) {
return null;
}
Region region = sessionFactory.getSecondLevelCacheRegion( regionName );
if ( region == null ) {
return null;
}
slcs = new ConcurrentSecondLevelCacheStatisticsImpl( region );
ConcurrentSecondLevelCacheStatisticsImpl previous;
if ( ( previous = (ConcurrentSecondLevelCacheStatisticsImpl) secondLevelCacheStatistics.putIfAbsent(
regionName, slcs
) ) != null ) {
slcs = previous;
}
}
return slcs;
}
示例3: getSecondLevelCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getSecondLevelCacheRegion(String regionName) {
return sessionFactoryImplementor.getSecondLevelCacheRegion(regionName);
}
示例4: getNaturalIdCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getNaturalIdCacheRegion(String regionName) {
return sessionFactoryImplementor.getNaturalIdCacheRegion(regionName);
}
示例5: ConcurrentSecondLevelCacheStatisticsImpl
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
ConcurrentSecondLevelCacheStatisticsImpl(Region region) {
super( region.getName() );
this.region = region;
}
示例6: ConcurrentNaturalIdCacheStatisticsImpl
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
ConcurrentNaturalIdCacheStatisticsImpl(Region region) {
super( region.getName() );
this.region = region;
}
示例7: addCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
@Override
public void addCacheRegion(String name, Region region) {
allCacheRegions.put( name, region );
}
示例8: getSecondLevelCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
@Override
public Region getSecondLevelCacheRegion(String regionName) {
return allCacheRegions.get( regionName );
}
示例9: getNaturalIdCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
@Override
public Region getNaturalIdCacheRegion(String regionName) {
return allCacheRegions.get( regionName );
}
示例10: getAllSecondLevelCacheRegions
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
@SuppressWarnings({ "unchecked" })
@Override
public Map<String, Region> getAllSecondLevelCacheRegions() {
return new HashMap<String,Region>( allCacheRegions );
}
示例11: getSecondLevelCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getSecondLevelCacheRegion(String regionName) {
return cacheAccess.getSecondLevelCacheRegion( regionName );
}
示例12: getNaturalIdCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getNaturalIdCacheRegion(String regionName) {
return cacheAccess.getNaturalIdCacheRegion( regionName );
}
示例13: getSecondLevelCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getSecondLevelCacheRegion(String regionName) {
return cacheAccess.getSecondLevelCacheRegion(regionName);
}
示例14: getNaturalIdCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
public Region getNaturalIdCacheRegion(String regionName) {
return cacheAccess.getNaturalIdCacheRegion(regionName);
}
示例15: getSecondLevelCacheRegion
import org.hibernate.cache.spi.Region; //导入依赖的package包/类
/**
* Get a named second-level cache region
*
* @param regionName The name of the region to retrieve.
* @return The region
*/
public Region getSecondLevelCacheRegion(String regionName);