Assign a transaction
@param v The value
489622
public void assignTransaction(TransactionImpl v)
   {
      txs.put(Long.valueOf(Thread.currentThread().getId()), v);
   }
1088471
public void setColumnCount(int v) {
    if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_columnCount == null)
      jcasType.jcas.throwFeatMissing("columnCount", "ch.epfl.bbp.uima.types.DataTable");
    jcasType.ll_cas.ll_setIntValue(addr, ((DataTable_Type)jcasType).casFeatCode_columnCount, v);}
1041695
public void registerTransaction(TransactionImpl tran) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "registerTransaction", new Object[] { this, tran });

        _recoveringTransactions.add(tran);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "registerTransaction", _recoveringTransactions.size());
    }
813465
public void commitTransaction() throws SystemException
   {
      Long key = Long.valueOf(Thread.currentThread().getId());
      TransactionImpl tx = txs.get(key);
      if (tx != null)
      {
         try
         {
            tx.commit();
         }
         catch (Throwable t)
         {
            SystemException se = new SystemException("Error during commit");
            se.initCause(t);
            throw se;
         }
      }
      else
      {
         throw new IllegalStateException("No transaction to commit");
      }
   }
79389
public static void putTransactionId(final String transactionId) {
		if ((transactionId != null) && (0 < transactionId.length())) {
			MDC.put(TRANSACTION_ID, transactionId);
		}
	}
748530
public void setRowCount(int v) {
    if (DataTable_Type.featOkTst && ((DataTable_Type)jcasType).casFeat_rowCount == null)
      jcasType.jcas.throwFeatMissing("rowCount", "ch.epfl.bbp.uima.types.DataTable");
    jcasType.ll_cas.ll_setIntValue(addr, ((DataTable_Type)jcasType).casFeatCode_rowCount, v);}
713391
public static void set(MutableDoubleTuple t, double v)
    {
        for (int i=0; i<t.getSize(); i++)
        {
            t.set(i, v);
        }
    }
524006
public void put(TransactionLocal key, Object value)
    {

        // We don't use a fast path as with get() because it is at
        // least as common to use set() to create new entries as
        // it is to replace existing ones, in which case, a fast
        // path would fail more often than not.

        Entry[] tab = table;
        int len = tab.length;
        int i = key.hashCode & (len - 1);

        for (Entry e = tab[i];
             e != null;
             e = tab[i = nextIndex(i, len)])
        {
            if (e.key == key)
            {
                e.value = value;
                return;
            }
        }

        tab[i] = new Entry(key, value);
        int sz = ++size;
        if (sz >= threshold)
            rehash();
    }
825774
public void setBlock(int v) {
    if (DocumentLine_Type.featOkTst && ((DocumentLine_Type)jcasType).casFeat_block == null)
      jcasType.jcas.throwFeatMissing("block", "ch.epfl.bbp.uima.types.DocumentLine");
    jcasType.ll_cas.ll_setIntValue(addr, ((DocumentLine_Type)jcasType).casFeatCode_block, v);}
612408
public V setValue(final V value) {
		V oldValue = this.getValue();
		this.values[tree.pageIndex] = value;
		return oldValue;
	}
1124214
public void setLocal(boolean local)
   {
      // start local transaction
      if (local && changesList.get() == null)
      {
         beginTransaction();
      }
      this.local.set(local);
   }
875961
public V put (K key, V value)
    {
        V result = _delegate.put(key, value);

        if (_tracking) {
            _seenKeys.add(key);
        }

        // avoid fruitless NOOPs
        if (result != value) {
            // updated our computed "size"
            _size += _sizer.computeSize(value);
            entryRemoved(result);
//         System.out.println("Added " + value + ": " + _size);
        }

        // flush if needed
        flush();

        return result;
    }
883471
public static void commit()
   {
      try {
         if (!isDone()) {
            userTransaction.commit();
         }
         else {
            LOGGER.warn("commit() called with no current transaction.");
         }
      }
      catch (Exception e) {
         throw new RuntimeException("Transaction commit failed.", e);
      }
   }
59111
public synchronized void putSITransaction(SITransaction transaction)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "putSITransaction", transaction);
      Transaction commsTx = (Transaction)transaction;

      int flags = -1;

      if (transaction == null)
      {
         // No transaction - add "no transaction" flags to buffer.
        putInt(0x00000000);
      }
      else
      {
         // First we must search for any optimized transactions as they hold much more information
         // than the old-style ones.
         OptimizedTransaction optTx = null;

         // First see if the transaction is a global one. This could be both optimized or
         // unoptimized but the result is buried within it
         if (transaction instanceof SuspendableXAResource)
         {
            SIXAResource suspendableXARes = ((SuspendableXAResource) transaction).getCurrentXAResource();
            if (suspendableXARes instanceof OptimizedTransaction)
            {
               // The current XA Resource is indeed optimized
               optTx = (OptimizedTransaction) suspendableXARes;
            }
         }
         // Otherwise the actual transaction itself may be an optimized one - this is in the case
         // of an optimized local transaction.
         else if (transaction instanceof OptimizedTransaction)
         {
            optTx = (OptimizedTransaction) transaction;
         }

         // If we are optimized...
         if (optTx != null)
         {
            // Optimized transaction
            flags = CommsConstants.OPTIMIZED_TX_FLAGS_TRANSACTED_BIT;

            boolean local = optTx instanceof SIUncoordinatedTransaction;
            boolean addXid = false;
            boolean endPreviousUow = false;
            if (local)
            {
               flags |= CommsConstants.OPTIMIZED_TX_FLAGS_LOCAL_BIT;
            }
            if (!optTx.isServerTransactionCreated())
            {
               flags |= CommsConstants.OPTIMIZED_TX_FLAGS_CREATE_BIT;
               if (local && optTx.areSubordinatesAllowed())
                  flags |= CommsConstants.OPTIMIZED_TX_FLAGS_SUBORDINATES_ALLOWED;
               optTx.setServerTransactionCreated();
               addXid = !local;
            }
            if (addXid && (optTx.isEndRequired()))
            {
               flags |= CommsConstants.OPTIMIZED_TX_END_PREVIOUS_BIT;
               endPreviousUow = true;
            }
            putInt(flags);
            putInt(optTx.getCreatingConversationId());
            putInt(commsTx.getTransactionId());
            if (addXid)
            {
               if (endPreviousUow)
               {
                  putInt(optTx.getEndFlags());
                  optTx.setEndNotRequired();
               }
               putXid(new XidProxy(optTx.getXidForCurrentUow()));
            }
         }
         else
         {
            // This is an un-optimized transaction - simply append transaction ID.
            putInt(commsTx.getTransactionId());
         }
      }

      if (TraceComponent.isAnyTracingEnabled()) {
        int commsId = -1;
        if (commsTx != null)  commsId = commsTx.getTransactionId();
        CommsLightTrace.traceTransaction(tc, "PutTxnTrace", commsTx, commsId, flags);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "putSITransaction");
   }
986963
public void startTransaction()
   {
      Long key = Long.valueOf(Thread.currentThread().getId());
      TransactionImpl tx = txs.get(key);

      if (tx == null)
      {
         TransactionImpl newTx = new TransactionImpl(key);
         tx = txs.putIfAbsent(key, newTx);
         if (tx == null)
            tx = newTx;
      }

      tx.active();
   }
308839
public void setTokenId(int v) {
    if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_tokenId == null)
      jcasType.jcas.throwFeatMissing("tokenId", "de.unihd.dbs.uima.types.heideltime.Token");
    jcasType.ll_cas.ll_setIntValue(addr, ((Token_Type)jcasType).casFeatCode_tokenId, v);}
915727
protected void assign(String name, Object value) {
        KeyWords.check(name);
        RequestContext.getValues().put(name, value);
    }