Package org.jboss.cache.lock

Examples of org.jboss.cache.lock.TimeoutException


   private byte[] acquireState(Fqn fqn) throws CacheException
   {
      // Call _getState with progressively longer timeouts until we
      // get state or it doesn't throw a TimeoutException
      long[] timeouts = {400, 800, 1600, configuration.getStateRetrievalTimeout()};
      TimeoutException timeoutException = null;

      for (int i = 0; i < timeouts.length; i++)
      {
         boolean force = (i == timeouts.length - 1);
View Full Code Here


      TreeCacheMBean cache = createCache("driver");
     
      TestingUtil.blockUntilViewReceived(cache, 2, 10000);
   
      HashMap hm = new HashMap();
      hm.put("te", new TimeoutException("test", new RuntimeException()));
      ConfigureException ce = null;
      try
      {
         ce = new ConfigureException("test", new RuntimeException());
      }
View Full Code Here

         super();
      }

      public byte[] _getState(Fqn fqn, long timeout, boolean force, boolean suppressErrors) throws Throwable
      {
         throw new TimeoutException("Planned Timeout");
      }     
View Full Code Here

   private byte[] acquireState(Fqn fqn) throws CacheException
   {
      // Call _getState with progressively longer timeouts until we
      // get state or it doesn't throw a TimeoutException
      long[] timeouts = {400, 800, 1600, configuration.getStateRetrievalTimeout()};
      TimeoutException timeoutException = null;

      for (int i = 0; i < timeouts.length; i++)
      {
         boolean force = (i == timeouts.length - 1);
View Full Code Here

      // Call each node in the cluster with progressively longer timeouts
      // until we get state or no cluster node returns a TimeoutException
      long[] timeouts = {400, 800, 1600};
      Object ourself = getLocalAddress(); // ignore ourself when we call
      boolean stateSet = false;
      TimeoutException timeoutException = null;
      Object timeoutTarget = null;

      boolean trace = log.isTraceEnabled();

      for (int i = 0; i < timeouts.length; i++)
View Full Code Here

            {
               ex = new SuspectException("Response suspected: " + rsp);
            }
            else
            {
               ex = new TimeoutException("Response timed out: " + rsp);
            }
            retval.add(new ReplicationException("rsp=" + rsp, ex));
         }
         else
         {
View Full Code Here

   private byte[] acquireState(Fqn fqn) throws Exception
   {
      // Call _getState with progressively longer timeouts until we
      // get state or it doesn't throw a TimeoutException
      long[] timeouts = {400, 800, 1600};
      TimeoutException timeoutException = null;

      boolean trace = log.isTraceEnabled();

      for (int i = 0; i < timeouts.length; i++)
      {
View Full Code Here

      {
         StringBuffer buf = new StringBuffer("failure acquiring lock: fqn=").append(fqn).append(", caller=").append(caller).
                 append(", lock=").append(lock_.toString(true));
         if (trace)
            log.trace(buf.toString());
         throw new TimeoutException(buf.toString(), e);
      }
   }
View Full Code Here

      // nothing wrong, just means that we fail to record the lock.  And that is a problem.
      // Better to check our records and lock again if necessary.
      if (!ctx.hasLock(fqn)) {
         if (!lockManager.lockAndRecord(fqn, WRITE, ctx)) {
            Object owner = lockManager.getWriteOwner(fqn);
            throw new TimeoutException("Unable to acquire lock on Fqn [" + fqn + "] after [" + ctx.getLockAcquisitionTimeout(defaultLockAcquisitionTimeout) + "] milliseconds for requestor [" + lockManager.getLockOwner(ctx) + "]! Lock held by [" + owner + "]");
         }
         return true;
      }
      return false;
   }
View Full Code Here

    * @param id
    * @return
    */
   Object removeLocal(Fqn<?> fqn, String id)
   {
      TimeoutException ex = null;
      for (int i = 0; i < RETRY; i++)
      {
         try
         {
            plainCache_.getInvocationContext().getOptionOverrides()
View Full Code Here

TOP

Related Classes of org.jboss.cache.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.