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

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


    boolean error = false;
    int count = 0;

    while(count < preAllocSize)
    {
      PageKey pkey = new PageKey(identity,
                     lastPreallocPagenum+count+1);
      try
      {
        // create Identity will do a writePage
        page.createIdentity(pkey, createArgs);
View Full Code Here


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

    PageKey pkey = (PageKey)record.getPageId();
    BasePage headPage = (BasePage)getPage(pkey.getPageNumber());

    if (headPage != null)
    {
      // The page could have been null if it was deallocated after the
      // row lock is gotten.  We are doing all of these post commit so
View Full Code Here

            tran.newLockingPolicy(
                LockingPolicy.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ,
                true); // striterOK
   
    PageKey pkey = new PageKey(identity, deallocLock.getPageNumber());
    if (lp != null)
        {
      if (zeroDuration)
        return lp.zeroDurationLockRecordForWrite(
                        tran, deallocLock, false, wait);
View Full Code Here

        Last slot number this record id was at.
    */
    transient private int slotNumberHint;

  public RecordId(ContainerKey container, long pageNumber, int recordId) {
    this.pageId = new PageKey(container, pageNumber);
    this.recordId = recordId;

    // FIRST_SLOT_NUMBER guaranteed to be zero
        // this.slotNumberHint = Page.FIRST_SLOT_NUMBER;
  }
View Full Code Here

    RawTransaction t = owner.getTransaction();

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

    PageKey pageId = getPageId(); // RESOLVE: MT problem ?

    for (int i = 0; i < numpurges; i++)
    {
      recordIds[i] = getHeaderAtSlot(slot + i).getId();
View Full Code Here

    BasePage dpage = (BasePage)destPage;

    // make sure they are from the same container - this means they are of
    // the same size and have the same page and record format.

    PageKey pageId = getPageId(); // RESOLVE: MT problem ?

    if (!pageId.getContainerId().equals(dpage.getPageId().getContainerId()))
        {
      throw StandardException.newException(
                    SQLState.DATA_DIFFERENT_CONTAINER,
                    pageId.getContainerId(),
                    dpage.getPageId().getContainerId());
        }

    int[] recordIds = new int[num_rows];
View Full Code Here

    // get num_rows row locks, need to predict what those recordIds will be

    int[] recordIds = new int[num_rows];

    PageKey pageId = getPageId(); // RESOLVE - MT problem ?

    // get new recordIds for the rows from this page
    // RESOLVE: we should also record the amount of reserved space

    for (int i = 0; i < num_rows; i++)
View Full Code Here

      SanityManager.ASSERT(key instanceof PageKey);
    }

    initialize();

    PageKey newIdentity = (PageKey) key;

    FileContainer myContainer =
            (FileContainer) containerCache.find(newIdentity.getContainerId());

    setContainerRowCount(myContainer.getEstimatedRowCount(0));

    try
    {
View Full Code Here

      SanityManager.ASSERT(key instanceof PageKey);
    }

    initialize();

    PageKey newIdentity = (PageKey) key;

    PageCreationArgs createArgs = (PageCreationArgs) createParameter;
        int formatId = createArgs.formatId;

    if (formatId == -1)
View Full Code Here

  /**
    Reset the pageNumber
  */
  protected final void resetPageNumber(long pageNumber)
  {
    pageId = new PageKey(pageId.getContainerId(), pageNumber);
  }
View Full Code Here

TOP

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

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.