Package org.apache.derby.impl.store.raw.data

Examples of org.apache.derby.impl.store.raw.data.BasePage.unlatch()


    // readers) if that is needed
    if ((page.isOverflowPage() && !overflowOK) ||
      (page.getPageStatus() != BasePage.VALID_PAGE))
    {
      // unlatch releases page from cache, see StoredPage.releaseExclusive()
            page.unlatch();
      page = null;
    }

    return page;
  }
View Full Code Here


    if (p != null)
    {
            // make sure the page is not too full
            if (!p.allowInsert())
            {
                p.unlatch();
                p = null;

                // it is too full, make sure we are tracking it so we won't
                // see it again.
                allocCache.trackUnfilledPage(pageNumber, false);
View Full Code Here

    if (!recordHeader.hasOverflow())
      return super.fetchNumFieldsAtSlot(slot);

    BasePage overflowPage = getOverflowPage(recordHeader.getOverflowPage());
    int count = overflowPage.fetchNumFieldsAtSlot(getOverflowSlot(overflowPage, recordHeader));
    overflowPage.unlatch();
    return count;
  }

    /**
     * Move record to a page toward the beginning of the file.
View Full Code Here

    try {

      int overflowSlot = getOverflowSlot(overflowPage, recordHeader);

      overflowPage.doUpdateAtSlot(t, overflowSlot, recordHeader.getOverflowId(), row, validColumns);
      overflowPage.unlatch();
      overflowPage = null;

      return;

    } finally {
View Full Code Here

      return;

    } finally {
      if (overflowPage != null) {
        overflowPage.unlatch();
        overflowPage = null;
      }
    }
  }
View Full Code Here

          // Update the previous record header to point to new portion
          if (curPage == this)
            updateOverflowDetails(this, handle, portionHandle);
          else
            updateOverflowDetails(handle, portionHandle);
          op.unlatch();
        }
                else
                {

          // See earlier comments on checking row reserved space.
View Full Code Here

                                                             encryptionBuf, false);
                        backupRaf.write(dataToWrite, 0, pageSize);

                        // unlatch releases page from cache, see
                        // StoredPage.releaseExclusive()
                        page.unlatch();
                        page = null;

                        // check if some one wants to commit drop the table while
                        // conatiner is being written to the backup. If so,
                        // abort  the backup and restart it once the drop
View Full Code Here

                    inBackup = false;
                    notifyAll();
                }

                if (page != null) {
                    page.unlatch();
                    page = null;
                }

                // if backup of container is not complete, close the file
                // handles and  remove the container file from the backup
View Full Code Here

                                                     encryptionBuf,
                                                     true);
                newRaf.write(dataToWrite, 0, pageSize);

                // unlatch releases page from cache.
                page.unlatch();
                page = null;
            }

            // sync the new version of the container.
            newRaf.sync(true);
View Full Code Here

                                    ioe,
                                    newFile);
        } finally {

            if (page != null) {
                page.unlatch();
                page = null;
            }
           
            if (newRaf != null) {
                try {
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.