56
56
import org .hibernate .boot .spi .MetadataBuildingContext ;
57
57
import org .hibernate .boot .spi .MetadataBuildingOptions ;
58
58
import org .hibernate .boot .spi .NaturalIdUniqueKeyBinder ;
59
- import org .hibernate .cache .cfg .internal .DomainDataRegionConfigImpl .Builder ;
60
- import org .hibernate .cache .spi .access .AccessType ;
61
59
import org .hibernate .cfg .AnnotatedClassType ;
62
60
import org .hibernate .cfg .AvailableSettings ;
63
61
import org .hibernate .cfg .CopyIdentifierComponentSecondPass ;
@@ -147,8 +145,6 @@ public class InFlightMetadataCollectorImpl implements InFlightMetadataCollector
147
145
private final Map <String , FetchProfile > fetchProfileMap = new HashMap <>();
148
146
private final Map <String , IdentifierGeneratorDefinition > idGeneratorDefinitionMap = new HashMap <>();
149
147
150
- private final Map <String , Builder > regionConfigBuilders = new ConcurrentHashMap <>();
151
-
152
148
private Map <String , SQLFunction > sqlFunctionMap ;
153
149
154
150
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -297,27 +293,6 @@ public void addEntityBinding(PersistentClass persistentClass) throws DuplicateMa
297
293
throw new DuplicateMappingException ( DuplicateMappingException .Type .ENTITY , entityName );
298
294
}
299
295
entityBindingMap .put ( entityName , persistentClass );
300
-
301
- final AccessType accessType = AccessType .fromExternalName ( persistentClass .getCacheConcurrencyStrategy () );
302
- if ( accessType != null ) {
303
- if ( persistentClass .isCached () ) {
304
- locateCacheRegionConfigBuilder ( persistentClass .getRootClass ().getCacheRegionName () ).addEntityConfig (
305
- persistentClass ,
306
- accessType
307
- );
308
- }
309
-
310
- if ( persistentClass .hasNaturalId () && persistentClass instanceof RootClass && persistentClass .getNaturalIdCacheRegionName () != null ) {
311
- locateCacheRegionConfigBuilder ( persistentClass .getNaturalIdCacheRegionName () ).addNaturalIdConfig (
312
- (RootClass ) persistentClass ,
313
- accessType
314
- );
315
- }
316
- }
317
- }
318
-
319
- private Builder locateCacheRegionConfigBuilder (String regionName ) {
320
- return regionConfigBuilders .computeIfAbsent ( regionName , Builder ::new );
321
296
}
322
297
323
298
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -340,14 +315,6 @@ public void addCollectionBinding(Collection collection) throws DuplicateMappingE
340
315
throw new DuplicateMappingException ( DuplicateMappingException .Type .COLLECTION , collectionRole );
341
316
}
342
317
collectionBindingMap .put ( collectionRole , collection );
343
-
344
- final AccessType accessType = AccessType .fromExternalName ( collection .getCacheConcurrencyStrategy () );
345
- if ( accessType != null ) {
346
- locateCacheRegionConfigBuilder ( collection .getCacheRegionName () ).addCollectionConfig (
347
- collection ,
348
- accessType
349
- );
350
- }
351
318
}
352
319
353
320
@@ -2260,7 +2227,6 @@ public MetadataImpl buildMetadataInstance(MetadataBuildingContext buildingContex
2260
2227
sqlResultSetMappingMap ,
2261
2228
namedEntityGraphMap ,
2262
2229
sqlFunctionMap ,
2263
- regionConfigBuilders .values (),
2264
2230
getDatabase (),
2265
2231
bootstrapContext
2266
2232
);
0 commit comments