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

项目:lams    文件:CacheImpl.java   
public CacheImpl(SessionFactoryImplementor sessionFactory) {
    this.sessionFactory = sessionFactory;
    this.settings = sessionFactory.getSettings();
    //todo should get this from service registry
    this.regionFactory = settings.getRegionFactory();
    regionFactory.start( settings, sessionFactory.getProperties() );
    if ( settings.isQueryCacheEnabled() ) {
        updateTimestampsCache = new UpdateTimestampsCache(
                settings,
                sessionFactory.getProperties(),
                sessionFactory
        );
        queryCache = settings.getQueryCacheFactory()
                .getQueryCache( null, updateTimestampsCache, settings, sessionFactory.getProperties() );
        queryCaches = new ConcurrentHashMap<String, QueryCache>();
        allCacheRegions.put( updateTimestampsCache.getRegion().getName(), updateTimestampsCache.getRegion() );
        allCacheRegions.put( queryCache.getRegion().getName(), queryCache.getRegion() );
    }
    else {
        updateTimestampsCache = null;
        queryCache = null;
        queryCaches = null;
    }
}
项目:lams    文件:StandardQueryCache.java   
/**
 * Constructs a StandardQueryCache instance
 *
 * @param settings The SessionFactory settings.
 * @param props Any properties
 * @param updateTimestampsCache The update-timestamps cache to use.
 * @param regionName The base query cache region name
 */
public StandardQueryCache(
        final Settings settings,
        final Properties props,
        final UpdateTimestampsCache updateTimestampsCache,
        final String regionName) {
    String regionNameToUse = regionName;
    if ( regionNameToUse == null ) {
        regionNameToUse = StandardQueryCache.class.getName();
    }
    final String prefix = settings.getCacheRegionPrefix();
    if ( prefix != null ) {
        regionNameToUse = prefix + '.' + regionNameToUse;
    }
    LOG.startingQueryCache( regionNameToUse );

    this.cacheRegion = settings.getRegionFactory().buildQueryResultsRegion( regionNameToUse, props );
    this.updateTimestampsCache = updateTimestampsCache;
}
项目:lams    文件:StandardQueryCacheFactory.java   
@Override
public QueryCache getQueryCache(
        final String regionName,
        final UpdateTimestampsCache updateTimestampsCache,
        final Settings settings,
        final Properties props) throws HibernateException {
    return new StandardQueryCache(settings, props, updateTimestampsCache, regionName);
}
项目:lemon    文件:SessionFactoryWrapper.java   
public UpdateTimestampsCache getUpdateTimestampsCache() {
    return sessionFactoryImplementor.getUpdateTimestampsCache();
}
项目:lams    文件:CacheImpl.java   
@Override
public UpdateTimestampsCache getUpdateTimestampsCache() {
    return updateTimestampsCache;
}
项目:lams    文件:SessionFactoryImpl.java   
public UpdateTimestampsCache getUpdateTimestampsCache() {
    return cacheAccess.getUpdateTimestampsCache();
}
项目:hibernate-dynamic-dialects    文件:SessionFactoryImpl.java   
public UpdateTimestampsCache getUpdateTimestampsCache() {
    return cacheAccess.getUpdateTimestampsCache();
}
项目:lams    文件:SessionFactoryImplementor.java   
/**
 * Get the cache of table update timestamps
 */
public UpdateTimestampsCache getUpdateTimestampsCache();
项目:lams    文件:CacheImplementor.java   
/**
 * Get {@code UpdateTimestampsCache} instance managed by the {@code SessionFactory}.
 */
public UpdateTimestampsCache getUpdateTimestampsCache();