Java Code Examples for org.hibernate.boot.registry.selector.spi.StrategySelector#resolveDefaultableStrategy()
The following examples show how to use
org.hibernate.boot.registry.selector.spi.StrategySelector#resolveDefaultableStrategy() .
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: QueryTranslatorFactoryInitiator.java From lams with GNU General Public License v2.0 | 6 votes |
@Override public QueryTranslatorFactory initiateService( Map configurationValues, ServiceRegistryImplementor registry) { final StrategySelector strategySelector = registry.getService( StrategySelector.class ); final QueryTranslatorFactory factory = strategySelector.resolveDefaultableStrategy( QueryTranslatorFactory.class, configurationValues.get( QUERY_TRANSLATOR ), ASTQueryTranslatorFactory.INSTANCE ); log.debugf( "QueryTranslatorFactory : %s", factory ); if ( factory instanceof ASTQueryTranslatorFactory ) { log.usingAstQueryTranslatorFactory(); } return factory; }
Example 2
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@Override public void start(SessionFactoryOptions settings, Properties properties) throws CacheException { this.redisson = createRedissonClient(properties); this.settings = new Settings(settings); StrategySelector selector = settings.getServiceRegistry().getService(StrategySelector.class); cacheKeysFactory = selector.resolveDefaultableStrategy(CacheKeysFactory.class, properties.get(Environment.CACHE_KEYS_FACTORY), new RedissonCacheKeysFactory(redisson.getConfig().getCodec())); }
Example 3
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@Override protected void prepareForUse(SessionFactoryOptions settings, @SuppressWarnings("rawtypes") Map properties) throws CacheException { this.redisson = createRedissonClient(properties); StrategySelector selector = settings.getServiceRegistry().getService(StrategySelector.class); cacheKeysFactory = selector.resolveDefaultableStrategy(CacheKeysFactory.class, properties.get(Environment.CACHE_KEYS_FACTORY), new RedissonCacheKeysFactory(redisson.getConfig().getCodec())); }
Example 4
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@Override public void start(SessionFactoryOptions settings, Properties properties) throws CacheException { this.redisson = createRedissonClient(properties); this.settings = new Settings(settings); StrategySelector selector = settings.getServiceRegistry().getService(StrategySelector.class); cacheKeysFactory = selector.resolveDefaultableStrategy(CacheKeysFactory.class, properties.get(Environment.CACHE_KEYS_FACTORY), new RedissonCacheKeysFactory(redisson.getConfig().getCodec())); }