Package org.jboss.cache

Examples of org.jboss.cache.TransactionEntry



    private void copyInvocationScopeOptionsToTxScope(InvocationContext ctx)
    {
        // notify the transaction entry that this override is in place.
        TransactionEntry entry = txTable.get(ctx.getGlobalTransaction());
        if (entry != null)
        {
            Option txScopeOption = new Option();
            txScopeOption.setCacheModeLocal(ctx.getOptionOverrides() != null && ctx.getOptionOverrides().isCacheModeLocal());
            entry.setOption(txScopeOption);
        }
    }
View Full Code Here


            // under the GlobalTx key
            if (txTable.get(gtx) == null)
            {
                // create a new transaction entry

                TransactionEntry entry = cache.isNodeLockingOptimistic() ? new OptimisticTransactionEntry() : new TransactionEntry();
                entry.setTransaction(ltx);
                log.debug("creating new tx entry");
                txTable.put(gtx, entry);
                if (log.isTraceEnabled()) log.trace("TxTable contents: " + txTable);
            }
View Full Code Here

    }


    private void cleanupStaleLocks(GlobalTransaction gtx) throws Throwable
    {
        TransactionEntry entry = txTable.get(gtx);
        if (entry != null)
           entry.releaseAllLocksLIFO(gtx);
    }
View Full Code Here

      else
      {
         if (log.isTraceEnabled())
            log.trace("Data gravitation performed under global transaction " + gtx + ".  Not broadcasting cleanups until the tx commits.  Adding to tx mod list instead.");
         transactionMods.put(gtx, cleanup);
         TransactionEntry te = getTransactionEntry(gtx);
         te.addModification(cleanup);
      }
   }
View Full Code Here

      return retval;
   }

   private void prepareCacheLoader(GlobalTransaction gtx, boolean onePhase) throws Exception {
      List modifications;
      TransactionEntry entry;
      int txPuts = 0;

      entry=tx_table.get(gtx);
      if(entry == null)
         throw new Exception("entry for transaction " + gtx + " not found in transaction table");
      modifications=entry.getCacheLoaderModifications();
      if(modifications.size() == 0)
         return;
      List cache_loader_modifications=new ArrayList();
      for(Iterator it=modifications.iterator(); it.hasNext();) {
         JBCMethodCall methodCall=(JBCMethodCall) it.next();
View Full Code Here

      return false;
   }

   private void prepareCacheLoader(GlobalTransaction gtx) throws Exception {
      List modifications;
      TransactionEntry entry;
      int txActs = 0;
     
      entry=tx_table.get(gtx);
      if(entry == null)
         throw new Exception("entry for transaction " + gtx + " not found in transaction table");
      modifications=entry.getCacheLoaderModifications();
      if(modifications.size() == 0)
         return;
      List cache_loader_modifications=new ArrayList();
      for(Iterator it=modifications.iterator(); it.hasNext();) {
         JBCMethodCall methodCall=(JBCMethodCall)it.next();
View Full Code Here

      boolean acquireLock = false; // do we need to acquire a lock if we load this node from cloader?
      Map nodeData = null;
      boolean initNode = false; // keep uninitialized
      Object key = null;
      InvocationContext ctx = getInvocationContext();
      TransactionEntry entry = null;
      GlobalTransaction gtx = null;
      if ((gtx = ctx.getGlobalTransaction()) != null)
      {
         entry = txTable.get(gtx);
      }
View Full Code Here

   private boolean wasRemovedInTx(Fqn fqn)
   {
      GlobalTransaction t = getInvocationContext().getGlobalTransaction();
      if (t == null)
         return false;
      TransactionEntry entry = txTable.get(t);
      Iterator i = entry.getCacheLoaderModifications().iterator();
      while (i.hasNext())
      {
         JBCMethodCall m = (JBCMethodCall) i.next();
         if (m.getMethodId() == MethodDeclarations.removeNodeMethodLocal_id
                 && fqn.isChildOrEquals((Fqn) m.getArgs()[1]))
View Full Code Here

        {
            return;
        }

        // get the transaction to create the nodes in
        TransactionEntry baseTransactionEntry = tx_table.get(gtx);
        OptimisticTransactionEntry transactionEntry = (OptimisticTransactionEntry) baseTransactionEntry;

        if (transactionEntry == null)
        {
            throw new CacheException("Unable to map global transaction " + gtx + " to transaction entry");
View Full Code Here


    private void copyInvocationScopeOptionsToTxScope(InvocationContext ctx)
    {
        // notify the transaction entry that this override is in place.
        TransactionEntry entry = txTable.get(ctx.getGlobalTransaction());
        if (entry != null)
        {
            Option txScopeOption = new Option();
            txScopeOption.setCacheModeLocal(ctx.getOptionOverrides() != null && ctx.getOptionOverrides().isCacheModeLocal());
            entry.setOption(txScopeOption);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.cache.TransactionEntry

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.