Java 类org.hibernate.cache.spi.Region 实例源码

项目:lams    文件:ConcurrentStatisticsImpl.java   
@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;
}
项目:lams    文件:ConcurrentStatisticsImpl.java   
/**
 * 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;
}
项目:lemon    文件:SessionFactoryWrapper.java   
public Region getSecondLevelCacheRegion(String regionName) {
    return sessionFactoryImplementor.getSecondLevelCacheRegion(regionName);
}
项目:lemon    文件:SessionFactoryWrapper.java   
public Region getNaturalIdCacheRegion(String regionName) {
    return sessionFactoryImplementor.getNaturalIdCacheRegion(regionName);
}
项目:lams    文件:ConcurrentSecondLevelCacheStatisticsImpl.java   
ConcurrentSecondLevelCacheStatisticsImpl(Region region) {
    super( region.getName() );
    this.region = region;
}
项目:lams    文件:ConcurrentNaturalIdCacheStatisticsImpl.java   
ConcurrentNaturalIdCacheStatisticsImpl(Region region) {
    super( region.getName() );
    this.region = region;
}
项目:lams    文件:CacheImpl.java   
@Override
public void addCacheRegion(String name, Region region) {
    allCacheRegions.put( name, region );
}
项目:lams    文件:CacheImpl.java   
@Override
public Region getSecondLevelCacheRegion(String regionName) {
    return allCacheRegions.get( regionName );
}
项目:lams    文件:CacheImpl.java   
@Override
public Region getNaturalIdCacheRegion(String regionName) {
    return allCacheRegions.get( regionName );
}
项目:lams    文件:CacheImpl.java   
@SuppressWarnings({ "unchecked" })
@Override
public Map<String, Region> getAllSecondLevelCacheRegions() {
    return new HashMap<String,Region>( allCacheRegions );
}
项目:lams    文件:SessionFactoryImpl.java   
public Region getSecondLevelCacheRegion(String regionName) {
    return cacheAccess.getSecondLevelCacheRegion( regionName );
}
项目:lams    文件:SessionFactoryImpl.java   
public Region getNaturalIdCacheRegion(String regionName) {
    return cacheAccess.getNaturalIdCacheRegion( regionName );
}
项目:hibernate-dynamic-dialects    文件:SessionFactoryImpl.java   
public Region getSecondLevelCacheRegion(String regionName) {
    return cacheAccess.getSecondLevelCacheRegion(regionName);
}
项目:hibernate-dynamic-dialects    文件:SessionFactoryImpl.java   
public Region getNaturalIdCacheRegion(String regionName) {
    return cacheAccess.getNaturalIdCacheRegion(regionName);
}
项目:lams    文件:SessionFactoryImplementor.java   
/**
 * Get a named second-level cache region
 *
 * @param regionName The name of the region to retrieve.
 * @return The region
 */
public Region getSecondLevelCacheRegion(String regionName);
项目:lams    文件:SessionFactoryImplementor.java   
/**
 * Get a named naturalId cache region
 *
 * @param regionName The name of the region to retrieve.
 * @return The region
 */
public Region getNaturalIdCacheRegion(String regionName);
项目:lams    文件:CacheImplementor.java   
/**
 * Add {@code Region} to this Cache scope.
 *
 * @param name The region name.
 * @param region The {@code Region} instance.
 */
public void addCacheRegion(String name, Region region);
项目:lams    文件:CacheImplementor.java   
/**
 * Get second level cache region by its name.
 *
 * @param regionName The region name.
 * @return The second level cache region.
 */
public Region getSecondLevelCacheRegion(String regionName);
项目:lams    文件:CacheImplementor.java   
/**
 * Get natural id cache region by its name.
 *
 * @param regionName The region name.
 * @return The natural id cache region.
 */
public Region getNaturalIdCacheRegion(String regionName);
项目:lams    文件:CacheImplementor.java   
/**
 * Get <tt>all</tt> cache regions, including query cache.
 *
 * @return The map contains all cache regions with region name as the key.
 */
public Map<String, Region> getAllSecondLevelCacheRegions();