Class H2TreeIndex

  • All Implemented Interfaces:
    org.h2.engine.DbObject, org.h2.index.Index, org.h2.schema.SchemaObject

    public class H2TreeIndex
    extends H2TreeIndexBase
    H2 Index over BPlusTree.
    • Method Detail

      • inlineSize

        public int inlineSize()
        Returns:
        Inline size.
      • find

        public org.h2.index.Cursor find​(org.h2.engine.Session ses,
                                        org.h2.result.SearchRow lower,
                                        org.h2.result.SearchRow upper)
      • getRowCount

        public long getRowCount​(org.h2.engine.Session ses)
      • findFirstOrLast

        public org.h2.index.Cursor findFirstOrLast​(org.h2.engine.Session ses,
                                                   boolean b)
      • putx

        public boolean putx​(H2CacheRow row)
        Puts row.
        Specified by:
        putx in class GridH2IndexBase
        Parameters:
        row - Row.
        Returns:
        True if existing row row has been replaced.
      • removex

        public boolean removex​(org.h2.result.SearchRow row)
        Removes row from index.
        Specified by:
        removex in class GridH2IndexBase
        Parameters:
        row - Row.
        Returns:
        True if row has been removed.
      • createLookupBatch

        public org.h2.index.IndexLookupBatch createLookupBatch​(org.h2.table.TableFilter[] filters,
                                                               int filter)
        Specified by:
        createLookupBatch in interface org.h2.index.Index
        Overrides:
        createLookupBatch in class org.h2.index.BaseIndex
      • findForSegment

        public Iterator<H2Row> findForSegment​(GridH2RowRangeBounds bounds,
                                              int segment,
                                              IndexQueryContext qryCtx)
        Find rows for the segments (distributed joins).
        Parameters:
        bounds - Bounds.
        segment - Segment.
        qryCtx - Index query context.
        Returns:
        Iterator.
      • toSearchRowMessage

        public GridH2RowMessage toSearchRowMessage​(org.h2.result.SearchRow row)
        Parameters:
        row - Search row.
        Returns:
        Row message.
      • size

        public long size()
                  throws IgniteCheckedException
        Returns number of elements in the tree by scanning pages of the bottom (leaf) level.
        Returns:
        Number of elements in the tree.
        Throws:
        IgniteCheckedException - If failed.
      • indexId

        public UUID indexId()
        Returns:
        Index's id.
      • unwrap

        public <T extends Index> T unwrap​(Class<T> clazz)
        Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.
        Overrides:
        unwrap in class GridH2IndexBase