Package org.infinispan.util.logging

Examples of org.infinispan.util.logging.Log.tracef()


            if (!commitEntryIfNeeded(ctx, command, entry, stateTransferFlag, metadata)) {
               if (trace) {
                  if (entry == null)
                     log.tracef("Entry for key %s is null : not calling commitUpdate", e.getKey());
                  else
                     log.tracef("Entry for key %s is not changed(%s): not calling commitUpdate", e.getKey(), entry);
               }
            }
         }
      }
   }
View Full Code Here


   }

   protected final void logRetry(VisitableCommand command) {
      final Log log = getLog();
      if (log.isTraceEnabled()) {
         log.tracef("Retrying command because of topology change: %s", command);
      }
   }

   protected final int currentTopologyId() {
      final CacheTopology cacheTopology = stateTransferManager.getCacheTopology();
View Full Code Here

      Log log = getLog();
      boolean trace = log.isTraceEnabled();
      if (checkForPendingLocks) {
         if (trace)
            log.tracef("Checking for pending locks and then locking key %s", toStr(key));

         final long expectedEndTime = timeService.expectedEndTime(cacheConfiguration.locking().lockAcquisitionTimeout(),
                                                                  TimeUnit.MILLISECONDS);

         // Check local transactions first
View Full Code Here

         // ... then remote ones
         waitForTransactionsToComplete(txContext, txTable.getRemoteTransactions(), key, transactionTopologyId, expectedEndTime);

         // Then try to acquire a lock
         if (trace)
            log.tracef("Finished waiting for other potential lockers, trying to acquire the lock on %s", toStr(key));

         final long remaining = timeService.remainingTime(expectedEndTime, TimeUnit.MILLISECONDS);
         lockManager.acquireLock(ctx, key, remaining, skipLocking);
      } else {
         if (trace)
View Full Code Here

         final long remaining = timeService.remainingTime(expectedEndTime, TimeUnit.MILLISECONDS);
         lockManager.acquireLock(ctx, key, remaining, skipLocking);
      } else {
         if (trace)
            log.tracef("Locking key %s, no need to check for pending locks.", toStr(key));

         lockManager.acquireLock(ctx, key, lockTimeout, skipLocking);
      }
   }
View Full Code Here

         public L apply(Object key, L lock) {
            // This happens atomically in the CHM
            if (lock == null) {
               Log log = getLog();
               if (log.isTraceEnabled())
                  log.tracef("Creating and acquiring new lock instance for key %s", toStr(key));

               lock = newLock();
               // Since this is a new lock, it is certainly uncontended.
               lock(lock, lockOwner);
               lockAcquired.set(Boolean.TRUE);
View Full Code Here

         public L apply(Object key, L lock) {
            // This will happen atomically in the CHM
            // We have a reference, so value can't be null
            Log log = getLog();
            if (log.isTraceEnabled())
               log.tracef("Unlocking lock instance for key %s", toStr(key));

            unlock(lock, lockOwner);

            int refCount = lock.getReferenceCounter().decrementAndGet();
            boolean remove = refCount == 0;
View Full Code Here

      Log log = getLog();
      boolean trace = log.isTraceEnabled();
      if (checkForPendingLocks) {
         if (trace)
            log.tracef("Checking for pending locks and then locking key %s", toStr(key));

         final long expectedEndTime = nowMillis() + cacheConfiguration.locking().lockAcquisitionTimeout();

         // Check local transactions first
         waitForTransactionsToComplete(txContext, txTable.getLocalTransactions(), key, transactionTopologyId, expectedEndTime);
View Full Code Here

         final long remaining = expectedEndTime - nowMillis();
         if (remaining <= 0) {
            throw newTimeoutException(key, txContext);
         } else {
            if (trace)
               log.tracef("Finished waiting for other potential lockers, trying to acquire the lock on %s", toStr(key));

            lockManager.acquireLock(ctx, key, remaining, skipLocking);
         }
      } else {
         if (trace)
View Full Code Here

            lockManager.acquireLock(ctx, key, remaining, skipLocking);
         }
      } else {
         if (trace)
            log.tracef("Locking key %s, no need to check for pending locks.", toStr(key));

         lockManager.acquireLock(ctx, key, lockTimeout, skipLocking);
      }
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.