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

        }


    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

        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

      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

                    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

    @exception StandardException Standard Derby policy.
  */
  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) latches are exclusive for simplicity and
    // 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;
        }

View Full Code Here

    <BR>
    MT - thread safe
  */
  boolean setExclusiveNoWait(BaseContainerHandle requester) throws StandardException {

    RawTransaction t = requester.getTransaction();

    // comment in setExclusive()
    synchronized (this)
    {
      if ((owner != null) && (t == owner.getTransaction())) {

        if (t.inAbort()) {
          //
          nestedLatch++;
          return true;
        }
      }
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.