Package org.infinispan.lock

Examples of org.infinispan.lock.TimeoutException


         for (Rsp rsp : rsps.values()) {
            if (rsp.wasSuspected() || !rsp.wasReceived()) {
               if (rsp.wasSuspected()) {
                  throw new SuspectException("Suspected member: " + rsp.getSender());
               } else {
                  throw new TimeoutException("Replication timeout for " + rsp.getSender());
               }
            } else {
               if (rsp.getValue() != null) {
                  Response value = (Response) rsp.getValue();
                  if (value instanceof ExceptionResponse) {
View Full Code Here


         if (lockManager.lockAndRecord(key, ctx)) {
            // successfully locked!
            return true;
         } else {
            Object owner = lockManager.getOwner(key);
            throw new TimeoutException("Unable to acquire lock on key [" + key + "] after [" + getLockAcquisitionTimeout(ctx)
                  + "] milliseconds for requestor [" + lockManager.getLockOwner(ctx) + "]! Lock held by [" + owner + "]");
         }
      }

      return false;
View Full Code Here

            if (rsp.wasSuspected() || !rsp.wasReceived()) {
               if (rsp.wasSuspected()) {
                  throw new SuspectException("Suspected member: " + rsp.getSender());
               } else {
                  // if we have a response filter then we may not have waited for some nodes!
                  if (responseFilter == null) throw new TimeoutException("Replication timeout for " + rsp.getSender());
               }
            } else {
               noValidResponses = false;
               if (rsp.getValue() != null) {
                  Response value = (Response) rsp.getValue();
                  if (value instanceof ExceptionResponse) {
                     Exception e = ((ExceptionResponse) value).getException();
                     if (!(e instanceof ReplicationException)) {
                        // if we have any application-level exceptions make sure we throw them!!
                        if (trace) log.trace("Recieved exception '{0}' from {1}", e, rsp.getSender());
                        throw e;
                     }
                  }
                  retval.add(value);
               }
            }
         }

         if (noValidResponses) throw new TimeoutException("Timed out waiting for valid responses!");
         return retval;
      } finally {
         // release the "processing" lock so that other threads are aware of the network call having completed
         if (unlock) flushTracker.releaseProcessingLock();
      }
View Full Code Here

TOP

Related Classes of org.infinispan.lock.TimeoutException

Copyright © 2018 www.massapicom. 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.