mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-12 22:24:47 +00:00
HHH-9695 - Fix merge conflicts and checkStyle failure
This commit is contained in:
parent
ccc83405c4
commit
6417a469f9
@ -457,7 +457,7 @@ private void startRegion(BaseRegion region, String regionName) {
|
||||
|
||||
private Map<String, TypeOverrides> initGenericDataTypeOverrides() {
|
||||
final TypeOverrides entityOverrides = new TypeOverrides();
|
||||
entityOverrides.setCacheName(DEF_ENTITY_RESOURCE);
|
||||
entityOverrides.setCacheName( DEF_ENTITY_RESOURCE );
|
||||
typeOverrides.put( ENTITY_KEY, entityOverrides );
|
||||
final TypeOverrides immutableEntityOverrides = new TypeOverrides();
|
||||
immutableEntityOverrides.setCacheName( DEF_IMMUTABLE_ENTITY_RESOURCE );
|
||||
|
@ -205,7 +205,7 @@ public void removeAll() throws CacheException {
|
||||
if ( !putValidator.invalidateRegion() ) {
|
||||
throw new CacheException( "Failed to invalidate pending putFromLoad calls for region " + region.getName() );
|
||||
}
|
||||
Caches.removeAll(cache);
|
||||
Caches.removeAll( cache );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,10 +46,11 @@ public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) thr
|
||||
case READ_ONLY:
|
||||
return new ReadOnlyAccess( this );
|
||||
case TRANSACTIONAL:
|
||||
if (getCacheDataDescription().isMutable()) {
|
||||
return new TransactionalAccess(this);
|
||||
} else {
|
||||
return new ReadOnlyAccess(this);
|
||||
if ( getCacheDataDescription().isMutable() ) {
|
||||
return new TransactionalAccess( this );
|
||||
}
|
||||
else {
|
||||
return new ReadOnlyAccess( this );
|
||||
}
|
||||
default:
|
||||
throw new CacheException( "Unsupported access type [" + accessType.getExternalName() + "]" );
|
||||
|
@ -153,22 +153,22 @@ public boolean checkValid() {
|
||||
// (without forcing autoCommit cache configuration).
|
||||
Transaction tx = getCurrentTransaction();
|
||||
if ( tx != null ) {
|
||||
log.tracef("Transaction, clearing one element at the time");
|
||||
Caches.removeAll(localAndSkipLoadCache);
|
||||
log.tracef( "Transaction, clearing one element at the time" );
|
||||
Caches.removeAll( localAndSkipLoadCache );
|
||||
}
|
||||
else {
|
||||
log.tracef("Non-transactional, clear in one go");
|
||||
log.tracef( "Non-transactional, clear in one go" );
|
||||
localAndSkipLoadCache.clear();
|
||||
}
|
||||
|
||||
log.tracef("Transition state from CLEARING to VALID");
|
||||
log.tracef( "Transition state from CLEARING to VALID" );
|
||||
invalidateState.compareAndSet(
|
||||
InvalidateState.CLEARING, InvalidateState.VALID
|
||||
);
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
if ( log.isTraceEnabled() ) {
|
||||
log.trace("Could not invalidate region: ", e);
|
||||
log.trace( "Could not invalidate region: ", e );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -223,7 +223,7 @@ public void resume(Transaction tx) {
|
||||
*/
|
||||
public void invalidateRegion() {
|
||||
if (log.isTraceEnabled()) {
|
||||
log.trace("Invalidate region: " + name);
|
||||
log.trace( "Invalidate region: " + name );
|
||||
}
|
||||
|
||||
Transaction tx = getCurrentTransaction();
|
||||
@ -254,7 +254,7 @@ public AdvancedCache getCache() {
|
||||
|
||||
public boolean isRegionInvalidatedInCurrentTx() {
|
||||
Transaction tx = getCurrentTransaction();
|
||||
return tx != null && tx.equals(invalidateTransaction);
|
||||
return tx != null && tx.equals( invalidateTransaction );
|
||||
}
|
||||
|
||||
private Transaction getCurrentTransaction() {
|
||||
|
@ -254,7 +254,8 @@ public static void removeAll(AdvancedCache cache) {
|
||||
CloseableIterator it = cache.keySet().iterator();
|
||||
try {
|
||||
while (it.hasNext()) {
|
||||
it.next(); // Necessary to get next element
|
||||
// Necessary to get next element
|
||||
it.next();
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user