private static SharedCacheMode determineSharedCacheMode(Mappings mappings) { SharedCacheMode mode; final Object value = mappings.getConfigurationProperties().get( "javax.persistence.sharedCache.mode" ); if ( value == null ) { LOG.debug( "No value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED" ); mode = SharedCacheMode.UNSPECIFIED; } else { if ( SharedCacheMode.class.isInstance( value ) ) { mode = ( SharedCacheMode ) value; } else { try { mode = SharedCacheMode.valueOf( value.toString() ); } catch ( Exception e ) { LOG.debugf( "Unable to resolve given mode name [%s]; using UNSPECIFIED : %s", value, e ); mode = SharedCacheMode.UNSPECIFIED; } } } return mode; }
private static SharedCacheMode determineSharedCacheMode(Mappings mappings) { SharedCacheMode mode; final Object value = mappings.getConfigurationProperties().get( "javax.persistence.sharedCache.mode" ); if ( value == null ) { LOG.debug( "No value specified for 'javax.persistence.sharedCache.mode'; using UNSPECIFIED" ); mode = SharedCacheMode.UNSPECIFIED; } else { if ( SharedCacheMode.class.isInstance( value ) ) { mode = ( SharedCacheMode ) value; } else { try { mode = SharedCacheMode.valueOf( value.toString() ); } catch ( Exception e ) { LOG.debugf( "Unable to resolve given mode name [%s]; using UNSPECIFIED : %s", value, e ); mode = SharedCacheMode.UNSPECIFIED; } } } return mode; }
private static CacheConcurrencyStrategy determineCacheConcurrencyStrategy(Mappings mappings) { if ( DEFAULT_CACHE_CONCURRENCY_STRATEGY == null ) { final RegionFactory cacheRegionFactory = SettingsFactory.createRegionFactory( mappings.getConfigurationProperties(), true ); DEFAULT_CACHE_CONCURRENCY_STRATEGY = CacheConcurrencyStrategy.fromAccessType( cacheRegionFactory.getDefaultAccessType() ); } return DEFAULT_CACHE_CONCURRENCY_STRATEGY; }
private static CacheConcurrencyStrategy determineCacheConcurrencyStrategy(Mappings mappings) { if ( DEFAULT_CACHE_CONCURRENCY_STRATEGY == null ) { final RegionFactory cacheRegionFactory = SettingsFactory.createRegionFactory( mappings.getConfigurationProperties(), true ); DEFAULT_CACHE_CONCURRENCY_STRATEGY = CacheConcurrencyStrategy.fromAccessType( cacheRegionFactory.getDefaultAccessType() ); } return DEFAULT_CACHE_CONCURRENCY_STRATEGY; }
mappings.getConfigurationProperties().getProperty( Environment.PREFER_POOLED_VALUES_LO, "false" ) );
mappings.getConfigurationProperties().getProperty( Environment.PREFER_POOLED_VALUES_LO, "false" ) );