HHH-9695 - Fix merge conflicts and checkStyle failure

This commit is contained in:
Andrea Boriero 2015-05-27 19:50:26 +01:00
parent ccc83405c4
commit 6417a469f9
5 changed files with 16 additions and 14 deletions

View File

@ -457,7 +457,7 @@ public class InfinispanRegionFactory implements RegionFactory {
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 );

View File

@ -205,7 +205,7 @@ public class TransactionalAccessDelegate {
if ( !putValidator.invalidateRegion() ) {
throw new CacheException( "Failed to invalidate pending putFromLoad calls for region " + region.getName() );
}
Caches.removeAll(cache);
Caches.removeAll( cache );
}
/**

View File

@ -46,10 +46,11 @@ public class EntityRegionImpl extends BaseTransactionalDataRegion implements Ent
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() + "]" );

View File

@ -153,22 +153,22 @@ public abstract class BaseRegion implements Region {
// (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 abstract class BaseRegion implements Region {
*/
public void invalidateRegion() {
if (log.isTraceEnabled()) {
log.trace("Invalidate region: " + name);
log.trace( "Invalidate region: " + name );
}
Transaction tx = getCurrentTransaction();
@ -254,7 +254,7 @@ public abstract class BaseRegion implements Region {
public boolean isRegionInvalidatedInCurrentTx() {
Transaction tx = getCurrentTransaction();
return tx != null && tx.equals(invalidateTransaction);
return tx != null && tx.equals( invalidateTransaction );
}
private Transaction getCurrentTransaction() {

View File

@ -254,7 +254,8 @@ public class Caches {
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();
}
}