diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/TypeOverrides.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/TypeOverrides.java index 41d1fa5639..9c1b8761b8 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/TypeOverrides.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/TypeOverrides.java @@ -104,11 +104,11 @@ public class TypeOverrides implements Serializable { } /** - * Maximum lifespan of a cache entry, afterQuery which the entry is expired + * Maximum lifespan of a cache entry, after which the entry is expired * cluster-wide, in milliseconds. -1 means the entries never expire. * * @param expirationLifespan long representing the maximum lifespan, - * in milliseconds, for a cached entry beforeQuery + * in milliseconds, for a cached entry before * it's expired */ public void setExpirationLifespan(long expirationLifespan) { @@ -126,7 +126,7 @@ public class TypeOverrides implements Serializable { * cluster-wide. -1 means the entries never expire. * * @param expirationMaxIdle long representing the maximum idle time, in - * milliseconds, for a cached entry beforeQuery it's + * milliseconds, for a cached entry before it's * expired */ public void setExpirationMaxIdle(long expirationMaxIdle) { diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/AccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/AccessDelegate.java index 42003a545d..138e7aeec2 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/AccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/AccessDelegate.java @@ -23,7 +23,7 @@ public interface AccessDelegate { Object get(SharedSessionContractImplementor session, Object key, long txTimestamp) throws CacheException; /** - * Attempt to cache an object, afterQuery loading from the database. + * Attempt to cache an object, after loading from the database. * * @param session Current session * @param key The item key @@ -35,7 +35,7 @@ public interface AccessDelegate { boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version); /** - * Attempt to cache an object, afterQuery loading from the database, explicitly + * Attempt to cache an object, after loading from the database, explicitly * specifying the minimalPut behavior. * * @param session Current session. @@ -51,7 +51,7 @@ public interface AccessDelegate { throws CacheException; /** - * Called afterQuery an item has been inserted (beforeQuery the transaction completes), + * Called after an item has been inserted (before the transaction completes), * instead of calling evict(). * * @param session Current session @@ -64,7 +64,7 @@ public interface AccessDelegate { boolean insert(SharedSessionContractImplementor session, Object key, Object value, Object version) throws CacheException; /** - * Called afterQuery an item has been updated (beforeQuery the transaction completes), + * Called after an item has been updated (before the transaction completes), * instead of calling evict(). * * @param session Current session @@ -79,7 +79,7 @@ public interface AccessDelegate { throws CacheException; /** - * Called afterQuery an item has become stale (beforeQuery the transaction completes). + * Called after an item has become stale (before the transaction completes). * * @param session Current session * @param key The key of the item to remove @@ -113,7 +113,7 @@ public interface AccessDelegate { /** * Called when we have finished the attempted update/delete (which may or - * may not have been successful), afterQuery transaction completion. This method + * may not have been successful), after transaction completion. This method * is used by "asynchronous" concurrency strategies. * * @@ -124,7 +124,7 @@ public interface AccessDelegate { void unlockItem(SharedSessionContractImplementor session, Object key) throws CacheException; /** - * Called afterQuery an item has been inserted (afterQuery the transaction completes), + * Called after an item has been inserted (after the transaction completes), * instead of calling release(). * This method is used by "asynchronous" concurrency strategies. * @@ -139,7 +139,7 @@ public interface AccessDelegate { boolean afterInsert(SharedSessionContractImplementor session, Object key, Object value, Object version); /** - * Called afterQuery an item has been updated (afterQuery the transaction completes), + * Called after an item has been updated (after the transaction completes), * instead of calling release(). This method is used by "asynchronous" * concurrency strategies. * diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationCacheAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationCacheAccessDelegate.java index a33dd36617..dbd42dc0d0 100755 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationCacheAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationCacheAccessDelegate.java @@ -71,7 +71,7 @@ public abstract class InvalidationCacheAccessDelegate implements AccessDelegate } /** - * Attempt to cache an object, afterQuery loading from the database, explicitly + * Attempt to cache an object, after loading from the database, explicitly * specifying the minimalPut behavior. * * @param session Current session diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationSynchronization.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationSynchronization.java index 94587ad8d1..0ca6e93969 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationSynchronization.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/InvalidationSynchronization.java @@ -9,7 +9,7 @@ package org.hibernate.cache.infinispan.access; import java.util.UUID; /** - * Synchronization that should release the locks afterQuery invalidation is complete. + * Synchronization that should release the locks after invalidation is complete. * * @author Radim Vansa <rvansa@redhat.com> */ diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonStrictAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonStrictAccessDelegate.java index e1004fa900..1252615dab 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonStrictAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonStrictAccessDelegate.java @@ -24,9 +24,9 @@ import org.infinispan.configuration.cache.Configuration; import org.infinispan.context.Flag; /** - * Access delegate that relaxes the consistency a bit: stale reads are prohibited only afterQuery the transaction + * Access delegate that relaxes the consistency a bit: stale reads are prohibited only after the transaction * commits. This should also be able to work with async caches, and that would allow the replication delay - * even afterQuery the commit. + * even after the commit. * * @author Radim Vansa <rvansa@redhat.com> */ @@ -80,7 +80,7 @@ public class NonStrictAccessDelegate implements AccessDelegate { public boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException { long lastRegionInvalidation = region.getLastRegionInvalidation(); if (txTimestamp < lastRegionInvalidation) { - log.tracef("putFromLoad not executed since tx started at %d, beforeQuery last region invalidation finished = %d", txTimestamp, lastRegionInvalidation); + log.tracef("putFromLoad not executed since tx started at %d, before last region invalidation finished = %d", txTimestamp, lastRegionInvalidation); return false; } assert version != null; diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxInvalidationCacheAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxInvalidationCacheAccessDelegate.java index 8d3a341483..6472ccc014 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxInvalidationCacheAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxInvalidationCacheAccessDelegate.java @@ -35,7 +35,7 @@ public class NonTxInvalidationCacheAccessDelegate extends InvalidationCacheAcces } // We need to be invalidating even for regular writes; if we were not and the write was followed by eviction - // (or any other invalidation), naked put that was started afterQuery the eviction ended but beforeQuery this insert + // (or any other invalidation), naked put that was started after the eviction ended but before this insert // ended could insert the stale entry into the cache (since the entry was removed by eviction). if ( !putValidator.beginInvalidatingWithPFER(session, key, value)) { throw log.failedInvalidatePendingPut(key, region.getName()); @@ -59,7 +59,7 @@ public class NonTxInvalidationCacheAccessDelegate extends InvalidationCacheAcces // be informed of the change. // We need to be invalidating even for regular writes; if we were not and the write was followed by eviction - // (or any other invalidation), naked put that was started afterQuery the eviction ended but beforeQuery this update + // (or any other invalidation), naked put that was started after the eviction ended but before this update // ended could insert the stale entry into the cache (since the entry was removed by eviction). if ( !putValidator.beginInvalidatingWithPFER(session, key, value)) { throw log.failedInvalidatePendingPut(key, region.getName()); @@ -76,7 +76,7 @@ public class NonTxInvalidationCacheAccessDelegate extends InvalidationCacheAcces protected boolean isCommitted(SharedSessionContractImplementor session) { if (session.isClosed()) { - // If the session has been closed beforeQuery transaction ends, so we cannot find out + // If the session has been closed before transaction ends, so we cannot find out // if the transaction was successful and if we can do the PFER. // As this can happen only in JTA environment, we can query the TransactionManager // directly here. diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxPutFromLoadInterceptor.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxPutFromLoadInterceptor.java index 1340971a80..97acce98ca 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxPutFromLoadInterceptor.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/NonTxPutFromLoadInterceptor.java @@ -27,7 +27,7 @@ import java.util.List; /** * Non-transactional counterpart of {@link TxPutFromLoadInterceptor}. * Invokes {@link PutFromLoadValidator#beginInvalidatingKey(Object, Object)} for each invalidation from - * remote node ({@link BeginInvalidationCommand} and sends {@link EndInvalidationCommand} afterQuery the transaction + * remote node ({@link BeginInvalidationCommand} and sends {@link EndInvalidationCommand} after the transaction * is complete, with help of {@link InvalidationSynchronization}; * * @author Radim Vansa <rvansa@redhat.com> diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java index 77fc9c5c3b..15f1d5a387 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/PutFromLoadValidator.java @@ -73,10 +73,10 @@ import org.infinispan.manager.EmbeddedCacheManager; * This class also supports the concept of "naked puts", which are calls to * {@link #acquirePutFromLoadLock(SharedSessionContractImplementor, Object, long)} without a preceding {@link #registerPendingPut(SharedSessionContractImplementor, Object, long)}. * Besides not acquiring lock in {@link #registerPendingPut(SharedSessionContractImplementor, Object, long)} this can happen when collection - * elements are loaded afterQuery the collection has not been found in the cache, where the elements + * elements are loaded after the collection has not been found in the cache, where the elements * don't have their own table but can be listed as 'select ... from Element where collection_id = ...'. * Naked puts are handled according to txTimestamp obtained by calling {@link RegionFactory#nextTimestamp()} - * beforeQuery the transaction is started. The timestamp is compared with timestamp of last invalidation end time + * before the transaction is started. The timestamp is compared with timestamp of last invalidation end time * and the write to the cache is denied if it is lower or equal. *

* @@ -88,7 +88,7 @@ public class PutFromLoadValidator { private static final boolean trace = log.isTraceEnabled(); /** - * Period afterQuery which ongoing invalidation is removed. Value is retrieved from cache configuration. + * Period after which ongoing invalidation is removed. Value is retrieved from cache configuration. */ private final long expirationPeriod; @@ -109,7 +109,7 @@ public class PutFromLoadValidator { private final NonTxPutFromLoadInterceptor nonTxPutFromLoadInterceptor; /** - * The time of the last call to {@link #endInvalidatingRegion()}. Puts from transactions started afterQuery + * The time of the last call to {@link #endInvalidatingRegion()}. Puts from transactions started after * this timestamp are denied. */ private volatile long regionInvalidationTimestamp = Long.MIN_VALUE; @@ -165,7 +165,7 @@ public class PutFromLoadValidator { List interceptorChain = cache.getInterceptorChain(); log.debug("Interceptor chain was: " + interceptorChain); int position = 0; - // add interceptor beforeQuery uses exact match, not instanceof match + // add interceptor before uses exact match, not instanceof match int invalidationPosition = 0; int entryWrappingPosition = 0; for (CommandInterceptor ci : interceptorChain) { @@ -184,7 +184,7 @@ public class PutFromLoadValidator { cache.getComponentRegistry().registerComponent(txInvalidationInterceptor, TxInvalidationInterceptor.class); cache.addInterceptor(txInvalidationInterceptor, invalidationPosition); - // Note that invalidation does *NOT* acquire locks; therefore, we have to start invalidating beforeQuery + // Note that invalidation does *NOT* acquire locks; therefore, we have to start invalidating before // wrapping the entry, since if putFromLoad was invoked between wrap and beginInvalidatingKey, the invalidation // would not commit the entry removal (as during wrap the entry was not in cache) TxPutFromLoadInterceptor txPutFromLoadInterceptor = new TxPutFromLoadInterceptor(this, cache.getName()); @@ -309,7 +309,7 @@ public class PutFromLoadValidator { // we need this check since registerPendingPut (creating new pp) can get between invalidation // and naked put caused by the invalidation else if (pending.lastInvalidationEnd != Long.MIN_VALUE) { - // if this transaction started afterQuery last invalidation we can continue + // if this transaction started after last invalidation we can continue valid = txTimestamp > pending.lastInvalidationEnd; } else { @@ -401,7 +401,7 @@ public class PutFromLoadValidator { * Invalidates all {@link #registerPendingPut(SharedSessionContractImplementor, Object, long) previously registered pending puts} ensuring a subsequent call to * {@link #acquirePutFromLoadLock(SharedSessionContractImplementor, Object, long)} will return false.

This method will block until any * concurrent thread that has {@link #acquirePutFromLoadLock(SharedSessionContractImplementor, Object, long) acquired the putFromLoad lock} for the any key has - * released the lock. This allows the caller to be certain the putFromLoad will not execute afterQuery this method returns, + * released the lock. This allows the caller to be certain the putFromLoad will not execute after this method returns, * possibly caching stale data.

* * @return true if the invalidation was successful; false if a problem occurred (which the @@ -422,9 +422,9 @@ public class PutFromLoadValidator { try { // Acquire the lock for each entry to ensure any ongoing - // work associated with it is completed beforeQuery we return + // work associated with it is completed before we return // We cannot erase the map: if there was ongoing invalidation and we removed it, registerPendingPut - // started afterQuery that would have no way of finding out that the entity *is* invalidated (it was + // started after that would have no way of finding out that the entity *is* invalidated (it was // removed from the cache and now the DB is about to be updated). for (Iterator it = pendingPuts.values().iterator(); it.hasNext(); ) { PendingPutMap entry = it.next(); @@ -533,7 +533,7 @@ public class PutFromLoadValidator { * and disables further registrations ensuring a subsequent call to {@link #acquirePutFromLoadLock(SharedSessionContractImplementor, Object, long)} * will return false.

This method will block until any concurrent thread that has * {@link #acquirePutFromLoadLock(SharedSessionContractImplementor, Object, long) acquired the putFromLoad lock} for the given key - * has released the lock. This allows the caller to be certain the putFromLoad will not execute afterQuery this method + * has released the lock. This allows the caller to be certain the putFromLoad will not execute after this method * returns, possibly caching stale data.

* After this transaction completes, {@link #endInvalidatingKey(Object, Object)} needs to be called } * @@ -585,7 +585,7 @@ public class PutFromLoadValidator { } /** - * Called afterQuery the transaction completes, allowing caching of entries. It is possible that this method + * Called after the transaction completes, allowing caching of entries. It is possible that this method * is called without previous invocation of {@link #beginInvalidatingKey(Object, Object)}, then it should be a no-op. * * @param lockOwner owner of the invalidation - transaction or thread @@ -792,7 +792,7 @@ public class PutFromLoadValidator { * are not accessed frequently; when these are accessed, we have to do the housekeeping * internally to prevent unlimited growth of the map. * The pending puts will get their timestamps when the map reaches {@link #GC_THRESHOLD} - * entries; afterQuery expiration period these will be removed completely either through + * entries; after expiration period these will be removed completely either through * invalidation or when we try to register next pending put. */ private void gc() { diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TombstoneAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TombstoneAccessDelegate.java index d98dffabd7..0ca9259a9e 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TombstoneAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TombstoneAccessDelegate.java @@ -79,7 +79,7 @@ public class TombstoneAccessDelegate implements AccessDelegate { public boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException { long lastRegionInvalidation = region.getLastRegionInvalidation(); if (txTimestamp < lastRegionInvalidation) { - log.tracef("putFromLoad not executed since tx started at %d, beforeQuery last region invalidation finished = %d", txTimestamp, lastRegionInvalidation); + log.tracef("putFromLoad not executed since tx started at %d, before last region invalidation finished = %d", txTimestamp, lastRegionInvalidation); return false; } if (minimalPutOverride) { @@ -88,7 +88,7 @@ public class TombstoneAccessDelegate implements AccessDelegate { Tombstone tombstone = (Tombstone) prev; long lastTimestamp = tombstone.getLastTimestamp(); if (txTimestamp <= lastTimestamp) { - log.tracef("putFromLoad not executed since tx started at %d, beforeQuery last invalidation finished = %d", txTimestamp, lastTimestamp); + log.tracef("putFromLoad not executed since tx started at %d, before last invalidation finished = %d", txTimestamp, lastTimestamp); return false; } } diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationCacheAccessDelegate.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationCacheAccessDelegate.java index 339eb0f849..68b9fb2447 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationCacheAccessDelegate.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationCacheAccessDelegate.java @@ -29,7 +29,7 @@ public class TxInvalidationCacheAccessDelegate extends InvalidationCacheAccessDe } // We need to be invalidating even for regular writes; if we were not and the write was followed by eviction - // (or any other invalidation), naked put that was started afterQuery the eviction ended but beforeQuery this insert + // (or any other invalidation), naked put that was started after the eviction ended but before this insert // ended could insert the stale entry into the cache (since the entry was removed by eviction). if ( !putValidator.beginInvalidatingKey(session, key)) { throw log.failedInvalidatePendingPut(key, region.getName()); @@ -53,7 +53,7 @@ public class TxInvalidationCacheAccessDelegate extends InvalidationCacheAccessDe // be informed of the change. // We need to be invalidating even for regular writes; if we were not and the write was followed by eviction - // (or any other invalidation), naked put that was started afterQuery the eviction ended but beforeQuery this update + // (or any other invalidation), naked put that was started after the eviction ended but before this update // ended could insert the stale entry into the cache (since the entry was removed by eviction). if ( !putValidator.beginInvalidatingKey(session, key)) { log.failedInvalidatePendingPut(key, region.getName()); diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationInterceptor.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationInterceptor.java index b0720ed3c7..d828385d18 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationInterceptor.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxInvalidationInterceptor.java @@ -91,7 +91,7 @@ public class TxInvalidationInterceptor extends BaseInvalidationInterceptor { public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable { Object retval = invokeNextInterceptor( ctx, command ); log.tracef( "Entering InvalidationInterceptor's prepare phase. Ctx flags are empty" ); - // fetch the modifications beforeQuery the transaction is committed (and thus removed from the txTable) + // fetch the modifications before the transaction is committed (and thus removed from the txTable) if ( shouldInvokeRemoteTxCommand( ctx ) ) { if ( ctx.getTransaction() == null ) { throw new IllegalStateException( "We must have an associated transaction" ); diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxPutFromLoadInterceptor.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxPutFromLoadInterceptor.java index 6552b9230c..570a5baa8f 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxPutFromLoadInterceptor.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/access/TxPutFromLoadInterceptor.java @@ -33,8 +33,8 @@ import org.infinispan.statetransfer.StateTransferManager; /** * Intercepts transactions in Infinispan, calling {@link PutFromLoadValidator#beginInvalidatingKey(Object, Object)} - * beforeQuery locks are acquired (and the entry is invalidated) and sends {@link EndInvalidationCommand} to release - * invalidation throught {@link PutFromLoadValidator#endInvalidatingKey(Object, Object)} afterQuery the transaction + * before locks are acquired (and the entry is invalidated) and sends {@link EndInvalidationCommand} to release + * invalidation throught {@link PutFromLoadValidator#endInvalidatingKey(Object, Object)} after the transaction * is committed. * * @author Radim Vansa <rvansa@redhat.com> @@ -68,14 +68,14 @@ class TxPutFromLoadInterceptor extends BaseRpcInterceptor { } // We need to intercept PrepareCommand, not InvalidateCommand since the interception takes - // place beforeQuery EntryWrappingInterceptor and the PrepareCommand is multiplexed into InvalidateCommands + // place before EntryWrappingInterceptor and the PrepareCommand is multiplexed into InvalidateCommands // as part of EntryWrappingInterceptor @Override public Object visitPrepareCommand(TxInvocationContext ctx, PrepareCommand command) throws Throwable { if (ctx.isOriginLocal()) { // We can't wait to commit phase to remove the entry locally (invalidations are processed in 1pc // on remote nodes, so only local case matters here). The problem is that while the entry is locked - // reads still can take place and we can read outdated collection afterQuery reading updated entity + // reads still can take place and we can read outdated collection after reading updated entity // owning this collection from DB; when this happens, the version lock on entity cannot protect // us against concurrent modification of the collection. Therefore, we need to remove the entry // here (even without lock!) and let possible update happen in commit phase. diff --git a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/EndInvalidationCommand.java b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/EndInvalidationCommand.java index 60b1e9d78c..c76aa6120f 100644 --- a/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/EndInvalidationCommand.java +++ b/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util/EndInvalidationCommand.java @@ -14,7 +14,7 @@ import org.infinispan.commands.remote.BaseRpcCommand; import org.infinispan.context.InvocationContext; /** - * Sent in commit phase (afterQuery DB commit) to remote nodes in order to stop invalidating + * Sent in commit phase (after DB commit) to remote nodes in order to stop invalidating * putFromLoads. * * @author Radim Vansa <rvansa@redhat.com> diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java index ba5fe4fa4a..e9dce9c8bf 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java @@ -646,7 +646,7 @@ public class InfinispanRegionFactoryTestCase { else m = super.createCacheManager(properties, serviceRegistry); // since data type cache configuration templates are defined when cache manager is created, - // we have to use hooks and set the configuration beforeQuery the whole factory starts + // we have to use hooks and set the configuration before the whole factory starts if (afterCacheManagerCreated != null) { afterCacheManagerCreated.accept(this, m); } diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/access/PutFromLoadValidatorUnitTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/access/PutFromLoadValidatorUnitTest.java index 8cd3944410..d57274a726 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/access/PutFromLoadValidatorUnitTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/access/PutFromLoadValidatorUnitTest.java @@ -159,7 +159,7 @@ public class PutFromLoadValidatorUnitTest { public void call() { PutFromLoadValidator testee = new PutFromLoadValidator(cm.getCache().getAdvancedCache(), regionFactory(cm)); Invalidation invalidation = new Invalidation(testee, removeRegion); - // the naked put can succeed because it has txTimestamp afterQuery invalidation + // the naked put can succeed because it has txTimestamp after invalidation NakedPut nakedPut = new NakedPut(testee, true); exec(transactional, invalidation, nakedPut); } @@ -469,7 +469,7 @@ public class PutFromLoadValidatorUnitTest { @Override public Void call() throws Exception { try { - long txTimestamp = System.currentTimeMillis(); // this should be acquired beforeQuery UserTransaction.begin() + long txTimestamp = System.currentTimeMillis(); // this should be acquired before UserTransaction.begin() SharedSessionContractImplementor session = mock (SharedSessionContractImplementor.class); putFromLoadValidator.registerPendingPut(session, KEY1, txTimestamp); @@ -500,7 +500,7 @@ public class PutFromLoadValidatorUnitTest { @Override public Void call() throws Exception { try { - long txTimestamp = System.currentTimeMillis(); // this should be acquired beforeQuery UserTransaction.begin() + long txTimestamp = System.currentTimeMillis(); // this should be acquired before UserTransaction.begin() SharedSessionContractImplementor session = mock (SharedSessionContractImplementor.class); PutFromLoadValidator.Lock lock = testee.acquirePutFromLoadLock(session, KEY1, txTimestamp); try { diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/collection/CollectionRegionAccessStrategyTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/collection/CollectionRegionAccessStrategyTest.java index 0255d9eea6..fbfe7ec0cd 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/collection/CollectionRegionAccessStrategyTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/collection/CollectionRegionAccessStrategyTest.java @@ -149,7 +149,7 @@ public class CollectionRegionAccessStrategyTest extends try { removeLatch.countDown(); // the remove should be blocked because the putFromLoad has been acquired - // and the remove can continue only afterQuery we've inserted the entry + // and the remove can continue only after we've inserted the entry assertFalse(pferLatch.await( 2, TimeUnit.SECONDS ) ); } catch (InterruptedException e) { diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java index e257828d52..0424c013f3 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/entity/EntityRegionAccessStrategyTest.java @@ -316,7 +316,7 @@ public class EntityRegionAccessStrategyTest extends log.debug("Read latch acquired, verify local access strategy"); // This won't block w/ mvc and will read the old value (if transactional as the transaction - // is not being committed yet, or if non-strict as we do the actual update only afterQuery transaction) + // is not being committed yet, or if non-strict as we do the actual update only after transaction) // or null if non-transactional Object expected = isTransactional() || accessType == AccessType.NONSTRICT_READ_WRITE ? VALUE1 : null; assertEquals("Correct value", expected, localAccessStrategy.get(session, KEY, session.getTimestamp())); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/AbstractNonInvalidationTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/AbstractNonInvalidationTest.java index bc657a87f2..7ee7c0549d 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/AbstractNonInvalidationTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/AbstractNonInvalidationTest.java @@ -112,7 +112,7 @@ public abstract class AbstractNonInvalidationTest extends SingleNodeTest { return executor.submit(() -> withTxSessionApply(s -> { try { Item item = s.load(Item.class, id); - item.getName(); // force load & putFromLoad beforeQuery the barrier + item.getName(); // force load & putFromLoad before the barrier loadBarrier.await(WAIT_TIMEOUT, TimeUnit.SECONDS); s.delete(item); if (preFlushLatch != null) { @@ -141,7 +141,7 @@ public abstract class AbstractNonInvalidationTest extends SingleNodeTest { return executor.submit(() -> withTxSessionApply(s -> { try { Item item = s.load(Item.class, id); - item.getName(); // force load & putFromLoad beforeQuery the barrier + item.getName(); // force load & putFromLoad before the barrier loadBarrier.await(WAIT_TIMEOUT, TimeUnit.SECONDS); item.setDescription("Updated item"); s.update(item); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java index 3d39729042..4a125bdbed 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ConcurrentWriteTest.java @@ -89,14 +89,14 @@ public class ConcurrentWriteTest extends SingleNodeTest { public void testSingleUser() throws Exception { // setup sessionFactory().getStatistics().clear(); - // wait a while to make sure that timestamp comparison works afterQuery invalidateRegion + // wait a while to make sure that timestamp comparison works after invalidateRegion Thread.sleep(1); Customer customer = createCustomer( 0 ); final Integer customerId = customer.getId(); getCustomerIDs().add( customerId ); - // wait a while to make sure that timestamp comparison works afterQuery collection remove (during insert) + // wait a while to make sure that timestamp comparison works after collection remove (during insert) Thread.sleep(1); assertNull( "contact exists despite not being added", getFirstContact( customerId ) ); @@ -120,17 +120,17 @@ public class ConcurrentWriteTest extends SingleNodeTest { final Contact contact = addContact( customerId ); assertNotNull( "contact returned by addContact is null", contact ); assertEquals( - "Customer.contacts cache was not invalidated afterQuery addContact", 0, + "Customer.contacts cache was not invalidated after addContact", 0, contactsCollectionSlcs.getElementCountInMemory() ); - assertNotNull( "Contact missing afterQuery successful add call", getFirstContact( customerId ) ); + assertNotNull( "Contact missing after successful add call", getFirstContact( customerId ) ); // read everyone's contacts readEveryonesFirstContact(); removeContact( customerId ); - assertNull( "contact still exists afterQuery successful remove call", getFirstContact( customerId ) ); + assertNull( "contact still exists after successful remove call", getFirstContact( customerId ) ); } diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/InvalidationTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/InvalidationTest.java index cab4466c29..5e7e26f57b 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/InvalidationTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/InvalidationTest.java @@ -91,8 +91,8 @@ public class InvalidationTest extends SingleNodeTest { Thread getThread = new Thread(() -> { try { withTxSession(s -> { - // DB load should happen beforeQuery the record is deleted, - // putFromLoad should happen afterQuery deleteThread ends + // DB load should happen before the record is deleted, + // putFromLoad should happen after deleteThread ends Item loadedItem = s.get(Item.class, item.getId()); if (getThreadBlockedInDB.get()) { assertNull(loadedItem); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ReadWriteTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ReadWriteTest.java index 0e75c4bcf0..172e86beeb 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ReadWriteTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/ReadWriteTest.java @@ -477,7 +477,7 @@ public class ReadWriteTest extends ReadOnlyTest { public void testNaturalIdCached() throws Exception { saveSomeCitizens(); - // Clear the cache beforeQuery the transaction begins + // Clear the cache before the transaction begins ReadWriteTest.this.cleanupCache(); Thread.sleep(10); @@ -533,7 +533,7 @@ public class ReadWriteTest extends ReadOnlyTest { assertEquals( "NaturalId Cache Puts", 2, stats.getNaturalIdCachePutCount() ); assertEquals( "NaturalId Cache Queries", 0, stats.getNaturalIdQueryExecutionCount() ); - //Try NaturalIdLoadAccess afterQuery insert + //Try NaturalIdLoadAccess after insert final Citizen citizen = withTxSessionApply(s -> { State france = ReadWriteTest.this.getState(s, "Ile de France"); NaturalIdLoadAccess naturalIdLoader = s.byNaturalId(Citizen.class); @@ -575,7 +575,7 @@ public class ReadWriteTest extends ReadOnlyTest { markRollbackOnly(s); }); - // Try NaturalIdLoadAccess afterQuery load + // Try NaturalIdLoadAccess after load withTxSession(s -> { State france = ReadWriteTest.this.getState(s, "Ile de France"); NaturalIdLoadAccess naturalIdLoader = s.byNaturalId(Citizen.class); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/TombstoneTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/TombstoneTest.java index 8eefd785e3..d2a37b6537 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/TombstoneTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/TombstoneTest.java @@ -50,7 +50,7 @@ public class TombstoneTest extends AbstractNonInvalidationTest { first.get(WAIT_TIMEOUT, TimeUnit.SECONDS); second.get(WAIT_TIMEOUT, TimeUnit.SECONDS); - // afterQuery commit, the tombstone should still be in memory for some time (though, updatable) + // after commit, the tombstone should still be in memory for some time (though, updatable) contents = Caches.entrySet(entityCache).toMap(); assertEquals(1, contents.size()); assertEquals(Tombstone.class, contents.get(itemId).getClass()); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/VersionedTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/VersionedTest.java index 131147f76b..79ee62d49b 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/VersionedTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/VersionedTest.java @@ -45,7 +45,7 @@ import static org.junit.Assert.assertTrue; * Tests specific to versioned entries -based caches. * Similar to {@link TombstoneTest} but some cases have been removed since * we are modifying the cache only once, therefore some sequences of operations - * would fail beforeQuery touching the cache. + * would fail before touching the cache. * * @author Radim Vansa <rvansa@redhat.com> */ diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTest.java index 086a6a693f..ad2bb3c2c7 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTest.java @@ -106,7 +106,7 @@ public class SessionRefreshTest extends DualNodeTest { acct0 = dao0.getAccountWithRefresh( id ); assertNotNull( acct0 ); assertEquals( DualNodeTest.REMOTE, acct0.getBranch() ); - log.debug( "Contents afterQuery refreshing in remote: " + TestingUtil.printCache( localCache ) ); + log.debug( "Contents after refreshing in remote: " + TestingUtil.printCache( localCache ) ); // Double check with a brand new session, in case the other session // for some reason bypassed the 2nd level cache @@ -114,6 +114,6 @@ public class SessionRefreshTest extends DualNodeTest { Account acct0A = dao0A.getAccount( id ); assertNotNull( acct0A ); assertEquals( DualNodeTest.REMOTE, acct0A.getBranch() ); - log.debug( "Contents afterQuery creating a new session: " + TestingUtil.printCache( localCache ) ); + log.debug( "Contents after creating a new session: " + TestingUtil.printCache( localCache ) ); } } diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/stress/CorrectnessTestCase.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/stress/CorrectnessTestCase.java index e778fff216..d63d7fb631 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/stress/CorrectnessTestCase.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/stress/CorrectnessTestCase.java @@ -688,7 +688,7 @@ public abstract class CorrectnessTestCase { throw e; } } - // cannot close beforeQuery XA commit since force increment requires open connection + // cannot close before XA commit since force increment requires open connection // s.close(); } diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/CacheTestUtil.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/CacheTestUtil.java index 31acdbfc2f..6ae4a8f03b 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/CacheTestUtil.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/CacheTestUtil.java @@ -186,7 +186,7 @@ public class CacheTestUtil { /** * Periodically calls callable and compares returned value with expected value. If the value matches to expected, * the method returns. If callable throws an exception, this is propagated. If the returned value does not match to - * expected beforeQuery timeout, {@link TimeoutException} is thrown. + * expected before timeout, {@link TimeoutException} is thrown. * @param expected * @param callable * @param timeout If non-positive, there is no limit. diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/TxUtil.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/TxUtil.java index ac8d23c7da..411da8fd9e 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/TxUtil.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/util/TxUtil.java @@ -28,7 +28,7 @@ public final class TxUtil { Caches.withinTx(tm, () -> { withSession(sb, s -> { consumer.accept(s); - // we need to flush the session beforeQuery close when running with JTA transactions + // we need to flush the session before close when running with JTA transactions s.flush(); }); return null;