Package org.jboss.cache.lock

Examples of org.jboss.cache.lock.TimeoutException


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


    * @param fqn
    * @param map
    */
   void put(Fqn fqn, Map map)
   {
      TimeoutException ex = null;
      for (int i = 0; i < RETRY; i++)
      {
         try
         {
            plainCache_.put(fqn, map);
View Full Code Here

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

    *
    * @param fqn
    */
   void remove(Fqn fqn)
   {
      TimeoutException ex = null;
      for (int i = 0; i < RETRY; i++)
      {
         try
         {
            plainCache_.removeNode(fqn);
View Full Code Here

    *
    * @param fqn
    */
   void removeLocal(Fqn fqn)
   {
      TimeoutException ex = null;
      for (int i = 0; i < RETRY; i++)
      {
         try
         {
            plainCache_.getInvocationContext().getOptionOverrides()
View Full Code Here

      throw new RuntimeException(RETRY_FAIL_MSG, ex);
   }
  
   void evictSubtree(Fqn fqn)
   {     
      TimeoutException ex = null;
      for (int i = 0; i < RETRY; i++)
      {
         try
         {
            plainCache_.evict(fqn, true);
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

      // 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

               {
                  ex = new SuspectException("Suspected member: " + rsp.getSender());
               }
               else
               {
                  ex = new TimeoutException("Replication timeout for " + rsp.getSender());
               }
               retval.add(new ReplicationException("rsp=" + rsp, ex));
               success = false;
            }
            else
View Full Code Here

      public void waitForFlushCompletion(long timeout) throws InterruptedException
      {
         if (channel.flushSupported() && !flushBlockGate.await(timeout, TimeUnit.MILLISECONDS))
         {
            throw new TimeoutException("Timed out waiting for flush to unblock. (timeout = " + CachePrinter.prettyPrint(timeout) + ")");
         }
      }
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.