类org.hibernate.cache.spi.TimestampsRegion源码实例Demo

下面列出了怎么用org.hibernate.cache.spi.TimestampsRegion的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: RegionFactoryTemplate.java
@Override
public TimestampsRegion buildTimestampsRegion(
		String regionName, SessionFactoryImplementor sessionFactory) {
	verifyStarted();
	return new TimestampsRegionTemplate(
			regionName,
			this,
			createTimestampsRegionStorageAccess( regionName, sessionFactory )
	);
}
 
源代码2 项目: lams   文件: EnabledCaching.java
public EnabledCaching(SessionFactoryImplementor sessionFactory) {
	this.sessionFactory = sessionFactory;

	this.regionFactory = getSessionFactory().getSessionFactoryOptions().getServiceRegistry().getService( RegionFactory.class );
	this.regionFactory.start( sessionFactory.getSessionFactoryOptions(), sessionFactory.getProperties() );

	if ( getSessionFactory().getSessionFactoryOptions().isQueryCacheEnabled() ) {
		final TimestampsRegion timestampsRegion = regionFactory.buildTimestampsRegion(
				RegionFactory.DEFAULT_UPDATE_TIMESTAMPS_REGION_UNQUALIFIED_NAME,
				sessionFactory
		);
		timestampsCache = sessionFactory.getSessionFactoryOptions()
				.getTimestampsCacheFactory()
				.buildTimestampsCache( this, timestampsRegion );
		legacySecondLevelCacheNames.add( timestampsRegion.getName() );

		final QueryResultsRegion queryResultsRegion = regionFactory.buildQueryResultsRegion(
				RegionFactory.DEFAULT_QUERY_RESULTS_REGION_UNQUALIFIED_NAME,
				sessionFactory
		);
		regionsByName.put( queryResultsRegion.getName(), queryResultsRegion );
		defaultQueryResultsCache = new QueryResultsCacheImpl(
				queryResultsRegion,
				timestampsCache
		);
	}
	else {
		timestampsCache = new TimestampsCacheDisabledImpl();
		defaultQueryResultsCache = null;
	}
}
 
源代码3 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties props) throws CacheException {
    return new HibernateTimestampsRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName));
}
 
源代码4 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties props) throws CacheException {
    return new HibernateTimestampsRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName));
}
 
源代码5 项目: redisson   文件: RedissonRegionFactory.java
@Override
public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties) throws CacheException {
    log.debug("Building timestamps cache region: " + regionName);
    
    RMapCache<Object, Object> mapCache = getCache(regionName, properties, TIMESTAMPS_DEF);
    return new RedissonTimestampsRegion(mapCache, ((Redisson)redisson).getConnectionManager(),this, properties, TIMESTAMPS_DEF);
}
 
源代码6 项目: lams   文件: TimestampsCacheEnabledImpl.java
public TimestampsCacheEnabledImpl(TimestampsRegion timestampsRegion) {
	this.timestampsRegion = timestampsRegion;
}
 
源代码7 项目: lams   文件: TimestampsCacheEnabledImpl.java
@Override
public TimestampsRegion getRegion() {
	return timestampsRegion;
}
 
源代码8 项目: lams   文件: TimestampsCacheDisabledImpl.java
@Override
public TimestampsRegion getRegion() {
	return null;
}
 
源代码9 项目: lams   文件: StandardTimestampsCacheFactory.java
@Override
public TimestampsCache buildTimestampsCache(
		CacheImplementor cacheManager,
		TimestampsRegion timestampsRegion) {
	return new TimestampsCacheEnabledImpl( timestampsRegion );
}
 
源代码10 项目: lams   文件: NoCachingRegionFactory.java
@Override
public TimestampsRegion buildTimestampsRegion(
		String regionName, SessionFactoryImplementor sessionFactory) {
	throw new NoCacheRegionFactoryAvailableException();
}
 
源代码11 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessFactory) {
    return new IgniteTimestampsRegion(this, regionName, accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName));
}
 
 类所在包
 同包方法