org.hibernate.cache.spi.TimestampsRegion Java Examples
The following examples show how to use
org.hibernate.cache.spi.TimestampsRegion.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RegionFactoryTemplate.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public TimestampsRegion buildTimestampsRegion( String regionName, SessionFactoryImplementor sessionFactory) { verifyStarted(); return new TimestampsRegionTemplate( regionName, this, createTimestampsRegionStorageAccess( regionName, sessionFactory ) ); }
Example #2
Source File: EnabledCaching.java From lams with GNU General Public License v2.0 | 5 votes |
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; } }
Example #3
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties props) throws CacheException { return new HibernateTimestampsRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName)); }
Example #4
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public TimestampsRegion buildTimestampsRegion(String regionName, Properties props) throws CacheException { return new HibernateTimestampsRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName)); }
Example #5
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@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); }
Example #6
Source File: TimestampsCacheEnabledImpl.java From lams with GNU General Public License v2.0 | 4 votes |
public TimestampsCacheEnabledImpl(TimestampsRegion timestampsRegion) { this.timestampsRegion = timestampsRegion; }
Example #7
Source File: TimestampsCacheEnabledImpl.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public TimestampsRegion getRegion() { return timestampsRegion; }
Example #8
Source File: TimestampsCacheDisabledImpl.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public TimestampsRegion getRegion() { return null; }
Example #9
Source File: StandardTimestampsCacheFactory.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public TimestampsCache buildTimestampsCache( CacheImplementor cacheManager, TimestampsRegion timestampsRegion) { return new TimestampsCacheEnabledImpl( timestampsRegion ); }
Example #10
Source File: NoCachingRegionFactory.java From lams with GNU General Public License v2.0 | 4 votes |
@Override public TimestampsRegion buildTimestampsRegion( String regionName, SessionFactoryImplementor sessionFactory) { throw new NoCacheRegionFactoryAvailableException(); }
Example #11
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override public TimestampsRegion buildTimestampsRegion(String regionName, SessionFactoryImplementor sessFactory) { return new IgniteTimestampsRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName)); }