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

Examples of org.apache.derby.iapi.store.raw.RecordHandle


        LeafControlRow control_row =
            new LeafControlRow(open_btree, page, null, true);

    byte insertFlag = Page.INSERT_INITIAL;
    insertFlag |= Page.INSERT_DEFAULT;
        RecordHandle rh =
            page.insertAtSlot(
                Page.FIRST_SLOT_NUMBER,
                control_row.getRow(),
                (FormatableBitSet) null,
                (LogicalUndo) null, insertFlag,
        AccessFactoryGlobals.BTREE_OVERFLOW_THRESHOLD);

        if (SanityManager.DEBUG)
        {
            RecordHandle    rh2 = null;

            rh2 = page.fetchFromSlot(
                    (RecordHandle) null,
                    Page.FIRST_SLOT_NUMBER,
                    new DataValueDescriptor[0], (FetchDescriptor) null, true);

            SanityManager.ASSERT(rh.getId() == rh2.getId() &&
                                 rh.getPageNumber() == rh2.getPageNumber());
        }

        if (SanityManager.DEBUG)
        {
            if (SanityManager.DEBUG_ON("enableBtreeConsistencyCheck"))
View Full Code Here


          // page is not held.  We only need a zero duration lock on
          // the new page because the allocPage is latched and this
          // is the only thread which can be looking at this
          // pageNumber.

          RecordHandle deallocLock = BasePage.MakeRecordHandle(pkey,
                 RecordHandle.DEALLOCATE_PROTECTION_HANDLE);

          if (!getDeallocLock(allocHandle, deallocLock,
                    false /* nowait */,
                    true /* zeroDuration */))
 
View Full Code Here

                lock_row_loc == lock_template[lock_template.length - 1],
                "row_loc is not the object in last column of lock_template.");
        }

        // Fetch the row location to lock.
        RecordHandle rec_handle =
            current_leaf.getPage().fetchFromSlot(
                (RecordHandle) null, current_slot,
                lock_template, lock_fetch_desc, true);

        // First try to get the lock NOWAIT, while latch is held.
View Full Code Here

    int                     lock_operation)
    throws StandardException
    {
        // The scan page lock is implemented as a row lock on the reserved
        // row id on the page (RecordHandle.RECORD_ID_PROTECTION_HANDLE).
        RecordHandle scan_lock_rh =
            current_leaf.getPage().makeRecordHandle(
                RecordHandle.RECORD_ID_PROTECTION_HANDLE);

        // First try to get the lock NOWAIT, while latch is held.
        boolean ret_status =
View Full Code Here

    LeafControlRow          current_leaf)
    throws StandardException
    {
        // The scan page lock is implemented as a row lock on the reserved
        // row id on the page (RecordHandle.RECORD_ID_PROTECTION_HANDLE).
        RecordHandle scan_lock_rh =
            current_leaf.getPage().makeRecordHandle(
                RecordHandle.RECORD_ID_PROTECTION_HANDLE);

        // First try to get the lock NOWAIT, while latch is held.
        return(
View Full Code Here

    {
        // This is first row in table, lock the special key that
        // represents the key previous to the first key of the table.
        try
        {
            RecordHandle scan_lock_rh =
                open_btree.makeRecordHandle(
                    page_number, RecordHandle.RECORD_ID_PROTECTION_HANDLE);

            scan_locking_policy.unlockRecordAfterRead(
                rawtran, open_btree.getContainerHandle(),
View Full Code Here

        throws StandardException
  {

        int                     ret_row_count     = 0;
        DataValueDescriptor[]   fetch_row         = null;
        RecordHandle            rh;

        if (max_rowcnt == -1)
            max_rowcnt = Long.MAX_VALUE;

View Full Code Here


                        Page page = scan_position.current_leaf.getPage();


                        RecordHandle rh =
                            page.fetchFromSlot(
                                (RecordHandle) null,
                                page.getSlotNumber(scan_position.current_rh),
                                scan_position.current_positionKey,
                                (FetchDescriptor) null,
View Full Code Here

                    scan_position.current_rh.getPageNumber())
            {
                scan_position.current_positionKey =
                    runtime_mem.get_row_for_export(getRawTran());

                RecordHandle rh =
                    page.fetchFromSlot(
                        (RecordHandle) null,
                        page.getSlotNumber(scan_position.current_rh),
                        scan_position.current_positionKey,
                        (FetchDescriptor) null,
View Full Code Here

          // page is not held.  We only need a zero duration lock on
          // the new page because the allocPage is latched and this
          // is the only thread which can be looking at this
          // pageNumber.

          RecordHandle deallocLock = BasePage.MakeRecordHandle(pkey,
                 RecordHandle.DEALLOCATE_PROTECTION_HANDLE);

          if (!getDeallocLock(allocHandle, deallocLock,
                    false /* nowait */,
                    true /* zeroDuration */))
 
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.raw.RecordHandle

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.