Package org.jboss.cache

Examples of org.jboss.cache.CacheException


   protected TransactionWorkspace getTransactionWorkspace(InvocationContext ctx) throws CacheException
   {
      OptimisticTransactionContext transactionContext = (OptimisticTransactionContext) ctx.getTransactionContext();
      if (transactionContext == null)
      {
         throw new CacheException("unable to map global transaction " + ctx + " to transaction entry");
      }
      // try and get the workspace from the transaction
      return transactionContext.getTransactionWorkSpace();
   }
View Full Code Here


      }

      @Override
      public Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable
      {
         throw new CacheException("Not handling " + command + "!");
      }
View Full Code Here

    * @return a backup Fqn
    */
   public Fqn getBackupFqn(String buddyGroupName, Fqn origFqn)
   {
      if (isBackupFqn(origFqn))
         throw new CacheException("Cannot make a backup Fqn from a backup Fqn! Attempting to create a backup of " + origFqn);

      List<Object> elements = new ArrayList<Object>(origFqn.size() + 2);
      elements.add(BuddyManager.BUDDY_BACKUP_SUBTREE);
      elements.add(buddyGroupName);
      elements.addAll(origFqn.peekElements());
View Full Code Here

    * @return a backup Fqn
    */
   public Fqn getBackupFqn(Fqn buddyGroupRoot, Fqn origFqn)
   {
      if (isBackupFqn(origFqn))
         throw new CacheException("Cannot make a backup Fqn from a backup Fqn! Attempting to create a backup of " + origFqn);

      List<Object> elements = new ArrayList<Object>(origFqn.size() + 2);
      elements.add(BuddyManager.BUDDY_BACKUP_SUBTREE);
      elements.add(buddyGroupRoot.get(1));
      elements.addAll(origFqn.peekElements());
View Full Code Here

            returnValue.initialize(dataContainer, cacheSpi, buddyFqnTransformer);
            command = returnValue;
            break;
         }
         default:
            throw new CacheException("Unknown command id " + id + "!");
      }

      command.setParameters(id, parameters);
      return command;
   }
View Full Code Here

               e = new RegionEmptyException();
            }
         }
         if (!fetchPersistentState && !fetchTransientState)
         {
            e = new CacheException("Cache instance at " + cache.getLocalAddress() + " is not configured to provide state");
         }
         marshaller.objectToObjectStream(e, out);
         if (e != null) throw e;
      }
   }
View Full Code Here

      {
         setState(in, target);
      }
      else
      {
         throw new CacheException("Cache instance at " + cache.getLocalAddress()
               + " cannot integrate state since state provider could not provide state due to " + marshaller.objectFromObjectStream(in));
      }
   }
View Full Code Here

         notifyAllNodesCreated(cache.getInvocationContext(), target);
      }
      catch (Exception e)
      {
         throw new CacheException(e);
      }
      finally
      {
         if (!transientSet)
         {
View Full Code Here

         nd = integrateStateTransferChildren(fqn, offset, nodeDataIterator);
      }
      if (nd != null && nd.isExceptionMarker())
      {
         NodeDataExceptionMarker ndem = (NodeDataExceptionMarker) nd;
         throw new CacheException("State provider node " + ndem.getCacheNodeIdentity()
               + " threw exception during loadState", ndem.getCause());
      }
      return null;
   }
View Full Code Here

   }

   public void rollback()
   {
      NodeSPI n = dataContainer.peek(fqn, false, false);
      if (n == null) throw new CacheException("node " + fqn + " not found for rollback!");
      if (oldValue == null)
      {
         n.removeDirect(key);
      }
      else
View Full Code Here

TOP

Related Classes of org.jboss.cache.CacheException

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.