Examples of RawTransaction


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

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

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

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

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

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

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

    RawTransaction t = owner.getTransaction();

    owner.getLockingPolicy().lockRecordForWrite(myLatch, handle);

    int slot = getSlotNumber(handle);
View Full Code Here

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

        }


    RecordHandle handle = getRecordHandleAtSlot(slot);

    RawTransaction t = owner.getTransaction();

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

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

        {
      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

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

        throw StandardException.newException(
                        SQLState.DATA_UNDELETE_RECORD);
            }
    }

    RawTransaction t = owner.getTransaction();

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

    RecordHandle handle = getRecordHandleAtSlot(slot);

    owner.getActionSet().actionDelete(t, this, slot, handle.getId(), delete, undo);
View Full Code Here

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

      throw StandardException.newException(
                    SQLState.DATA_SLOT_NOT_ON_PAGE);
        }

    RawTransaction t = owner.getTransaction();

    // lock the records to be purged
    int[] recordIds = new int[numpurges];

    PageKey pageId = getPageId(); // RESOLVE: MT problem ?
View Full Code Here

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

                    dpage.getPageId().getContainerId());
        }

    int[] recordIds = new int[num_rows];

    RawTransaction t = owner.getTransaction();

    // lock the records to be purged and calculate total space needed
    for (int i = 0; i < num_rows; i++)
    {
      RecordHandle handle = getRecordHandleAtSlot(src_slot+i);
View Full Code Here

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

    @exception StandardException Standard Cloudscape policy.
  */
  public void setExclusive(BaseContainerHandle requester)
    throws StandardException {

    RawTransaction t = requester.getTransaction();

    // In some cases latches are held until after a commit or an abort
    // (currently internal and nested top transactions.
    // If this is the case then during an abort a latch
    // request will be made for a latch that is already held.
    // We do not allow the latch to be obtained multiple times
    // because i) lock manager might assume latches are exclusive for
    // performance, ii) holding a page latched means that the page is
    // on the container handle's obervers list, if we latched it twice
    // then the paeg would have to be on the list twice, which is not supported
    // since the page has value equality. To be on the list twice reference
    // equality would be required, which would mean pushing a ReferenceObservable
    // object for every latch; iii) other unknown reasons :-)
    synchronized (this)
    {
      // need synchronized block because owner may be set to null in the
      // middle if another thread is in the process of unlatching the
      // page
      if ((owner != null) && (t == owner.getTransaction())) {

        if (t.inAbort()) {
          //
          nestedLatch++;
          return;
        }
      }
      // just deadlock out ...
    }


    // Latch the page, owner is set through the Lockable call backs.
    t.getLockFactory().latchObject(
            t, this, requester, C_LockFactory.WAIT_FOREVER);   

        // latch granted, but cleaner may "own" the page. 

    if (SanityManager.DEBUG) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.