Package org.apache.derby.iapi.store.raw.xact

Examples of org.apache.derby.iapi.store.raw.xact.RawTransaction


        }

    if (!allowInsert())
      return null;

    RawTransaction t = owner.getTransaction();

    // logical operations not allowed in internal transactions.
    if (undo != null) {
      t.checkLogicalOperationOk();
    }

        int recordId;
        RecordHandle handle;
View Full Code Here


    // Handle of the first portion of the chain
    RecordHandle headHandle = null;
    RecordHandle handleToUpdate = null;

    RawTransaction t = curPage.owner.getTransaction();

    for (;;) {

      if (SanityManager.DEBUG) {
        SanityManager.ASSERT(curPage.isLatched());
View Full Code Here

    // when inserting a long column startCOlumn is just used
    // as a flag. -1 means the insert is complete, != -1 indicates
    // more inserts are required.
    int startColumn = 0;
    RawTransaction t = curPage.owner.getTransaction();

    do {
      // in this loop, we do 3 things:
      // 1. get a new overflow page
      // 2. insert portion of a long column
View Full Code Here

  }

  protected void prepareForBulkLoad(BaseContainerHandle handle, int numPage)
  {
    clearPreallocThreshold();
    RawTransaction tran = handle.getTransaction();

    // find the last allocation page - do not invalidate the alloc cache,
    // we don't want to prevent other people from reading or writing
    // pages.
    AllocPage allocPage = findLastAllocPage(handle, tran);
View Full Code Here

  }

  protected void prepareForBulkLoad(BaseContainerHandle handle, int numPage)
  {
    clearPreallocThreshold();
    RawTransaction tran = handle.getTransaction();

    // find the last allocation page - do not invalidate the alloc cache,
    // we don't want to prevent other people from reading or writing
    // pages.
    AllocPage allocPage = findLastAllocPage(handle, tran);
View Full Code Here

        if (ttab.findTransactionContextByGlobalId(gid) != null)
        {
            throw StandardException.newException(SQLState.STORE_XA_XAER_DUPID);
        }

        RawTransaction xact =
            startCommonTransaction(
                rsf, cm, false, null,
                USER_CONTEXT_ID, AccessFactoryGlobals.USER_TRANS_NAME, true);

        xact.setTransactionId(gid, xact.getId());

        return(xact);
  }
View Full Code Here

    int irbcount = 0;

    // First undo internal transactions if there is any
    if (ttab.hasRollbackFirstTransaction())
    {
      RawTransaction internalTransaction = startInternalTransaction(rsf,
        recoveryTransaction.getContextManager());

      // make this transaction be aware that it is being used by recovery
      internalTransaction.recoveryTransaction();

      if (SanityManager.DEBUG)
        SanityManager.ASSERT(
                    internalTransaction.handlesPostTerminationWork() == false,
                    "internal recovery xact handles post termination work");

      while(ttab.getMostRecentRollbackFirstTransaction(
                                                internalTransaction))
      {
        irbcount++;
        internalTransaction.abort();
      }

      internalTransaction.close();
    }

    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(
View Full Code Here

                // allocate new context and associate new xact with it.
                ContextManager cm      = contextFactory.newContextManager();
                contextFactory.setCurrentContextManager(cm);

        try {
                RawTransaction rawtran =
                    startTransaction(
                        rawStoreFactory, cm,
                        AccessFactoryGlobals.USER_TRANS_NAME);

                if (ttab.getMostRecentPreparedRecoveredXact(rawtran))
                {
                    // found a prepared xact.  The reprepare() call will
                    // accumulate locks, and change the transaction table entry
                    // to not be "in-recovery" so that it won't show up again.
                    rawtran.reprepare();

                    if (SanityManager.DEBUG)
                        prepared_count++;
                }
                else
                {
                    // get rid of last transaction allocated.
                    rawtran.destroy();
                    break;
                }
        }
        finally
        {
View Full Code Here

        }


    RecordHandle handle = getRecordHandleAtSlot(slot);

    RawTransaction t = owner.getTransaction();

    doUpdateAtSlot(t, slot, handle.getId(), row, validColumns);
   
    return handle;
  }
View Full Code Here

        {
      throw StandardException.newException(
                    SQLState.DATA_UPDATE_DELETED_RECORD);
        }

    RawTransaction t = owner.getTransaction();
    RecordHandle handle = getRecordHandleAtSlot(slot);

    owner.getActionSet().actionUpdateField(t, this, slot,
        handle.getId(), fieldId, newValue, undo);
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.raw.xact.RawTransaction

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.