Documentation of 'org.apache.derby.impl.store.access.btree.LeafControlRow' Java class
LeafControlRow
org.apache.derby.impl.store.access.btree

Class LeafControlRow

    • Constructor Detail

      • LeafControlRow

        public LeafControlRow()
        No arg constructor.

        Public no arg constructor is for the monitor to call for format id implemenation, it should not be called for any other reason.

    • Method Detail

      • initEmptyBtree

        public static void initEmptyBtree(OpenBTree open_btree)
                                   throws StandardException
        Initialize conglomerate with one page, to be a 1 page btree. Given a conglomerate which already has one page allocated to it, initialize the page to be a leaf-root page with no entries. Allocate the control row and store it on the page.
        Parameters:
        open_btree - The open btree to initialize (container is open).
        Throws:
        StandardException - Standard exception policy.
      • isLeftmostLeaf

        public boolean isLeftmostLeaf()
                               throws StandardException
        Is the current page the leftmost leaf of tree?

        Specified by:
        isLeftmostLeaf in class ControlRow
        Returns:
        true if the current page is the leftmost leaf of the tree, else return false.
        Throws:
        StandardException - Standard exception policy.
      • isRightmostLeaf

        public boolean isRightmostLeaf()
                                throws StandardException
        Is the current page the rightmost leaf of tree?

        Specified by:
        isRightmostLeaf in class ControlRow
        Returns:
        true if the current page is the rightmost leaf of the tree, else return false.
        Throws:
        StandardException - Standard exception policy.
      • search

        public ControlRow search(SearchParameters sp)
                          throws StandardException
        Perform a search of this leaf page, ultimately returning the latched leaf page and row slot after which the given key belongs. The slot is returned in the result structure. If the key exists on the page, the result.exact will be true. Otherwise, result.exact will be false, and the row slot returned will be the one immediately preceding the position at which the key belongs.
        Specified by:
        search in class ControlRow
        Throws:
        StandardException - Standard exception policy.
      • checkConsistency

        public int checkConsistency(OpenBTree btree,
                                    ControlRow parent,
                                    boolean check_other_pages)
                             throws StandardException
        Perform consistency checks on a leaf page. Check consistency of the page and its children, returning the number of pages seen, and throwing errors if inconsistencies are found. The checks specific to a leaf page are:
      • Page is at level 0.
      • Version is a valid leaf page version.
      • Control row has right number of columns for leaf.
      • This method also performs the consistency checks that are common to both leaf and branch pages.
        Parameters:
        btree - The open btree to associate latches/locks with.
        parent - The parent page of this page, "null" if this page is root or if not maintaining parent links.
        check_other_pages - Should the consistency check go to other pages (this option breaks the latch protocol).
        Returns:
        The identifier to be used to open the conglomerate later.
        Throws:
        StandardException - Standard exception policy.
        See Also:
        ControlRow.checkGeneric(org.apache.derby.impl.store.access.btree.OpenBTree, org.apache.derby.impl.store.access.btree.ControlRow, boolean)
      • getTypeFormatId

        public int getTypeFormatId()
        Return my format identifier.
        Returns:
        The identifier. (A UUID stuffed in an array of 16 bytes).
        See Also:
        TypedFormat.getTypeFormatId()

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.