Package com.hp.hpl.jena.tdb.base.record

Examples of com.hp.hpl.jena.tdb.base.record.Record


        root.internalCheckNode() ;
        root.promote() ;
       
        // Median record
        int splitIdx = root.params.SplitIndex ;
        Record rec = root.records.get(splitIdx) ;
       
        if ( logging() )
        {
            log.debug(format("** Split root %d (%s)", splitIdx, rec)) ;
            log.debug("splitRoot >>   "+root) ;
View Full Code Here


            this.write() ;
        }
       
        // Go to bottom
        // Need to return the new key.
        Record r2 =  page.internalDelete(rec) ;
        if ( x >= 0 )
        {
            promote() ;
            // YUK
            records.set(x, keyRecord(page.maxRecord())) ;
View Full Code Here

            log.debug(">> left:  "+left) ;
            log.debug(">> right: "+right) ;
        }
       
        // /==\ + key + /==\   ==>   /====\
        Record splitKey = records.get(dividingSlot) ;
        BPTreePage page = left.merge(right, splitKey) ;
        // Must release right (not done in merge)
        if ( logging() )
            log.debug("-- merge: "+page) ;
View Full Code Here

        {
            log.debug(">> shiftRight: this:  "+this) ;
            log.debug(">> shiftRight: left:  "+left) ;
            log.debug(">> shiftRight: right: "+right) ;
        }
        Record r1 = records.get(i) ;
        Record r2 = left.shiftRight(right, r1) ;
        r2 = keyRecord(r2) ;
        this.records.set(i, r2) ;
       
        left.write() ;
        right.write() ;
View Full Code Here

        {
            log.debug(">> shiftLeft: this:  "+this) ;
            log.debug(">> shiftLeft: left:  "+left) ;
            log.debug(">> shiftLeft: right: "+right) ;
        }
        Record r1 = records.get(i) ;
        Record r2 = left.shiftLeft(right, r1) ;
        r2 = keyRecord(r2) ;
        this.records.set(i, r2) ;
       
        left.write() ;
        right.write() ;
View Full Code Here

        {
            if (count == 0 ) error("Node is empty - can't shift a slot out") ;
            if ( node.isFull() ) error("Destination node is full") ;
        }
        // Records: promote moving element, replace with splitKey
        Record r = this.records.getHigh() ;
        this.records.removeTop() ;
        node.records.add(0, splitKey) ;
       
        // Pointers just shift
        this.ptrs.shiftRight(node.ptrs) ;
View Full Code Here

        if ( CheckingNode )
        {
            if ( count == 0 ) error("Node is empty - can't shift a slot out") ;
            if ( isFull() ) error("Destination node is full") ;
        }
        Record r = node.records.getLow() ;
        // Records: promote moving element, replace with splitKey
        this.records.add(splitKey) ;
        node.records.shiftDown(0) ;
       
        // Pointers just shift
View Full Code Here

    private final String recstr(RecordBuffer records, int idx)
    {
        if ( records.isClear(idx) )
            return "----" ;

        Record r = records._get(idx) ;
        return r.toString() ;
    }
View Full Code Here

            //warning("Runt node: %s", this) ;
            error("Runt node: %s", this) ;
        }
        if ( !isRoot() && count > maxRecords() ) error("Over full node: %s", this) ;
        if ( ! isLeaf && parent == id ) error("Parent same as id: %s", this)
        Record k = min ;
   
        // Test records in the allocated area
        for ( int i = 0 ; i < count ; i++ )
        {
            if ( records.get(i) == null ) error("Node: %d : Invalid record @%d :: %s",id, i, this) ;
            if ( k != null && keyGT(k, records.get(i)) )
            {
                Record r = records.get(i) ;
                //keyGT(k, r) ;
                error("Node: %d: Not sorted (%d) (%s, %s) :: %s ", id, i, k, r, this) ;
            }
            k = records.get(i) ;
        }
View Full Code Here

        // Check pointers.
        int limit = (count == 0) ? 0 : count+1 ;
       
        for ( int i = 0 ; i < limit ; i++ )
        {
            Record min1 = min ;
            Record max1 = max ;
            BPTreePage n = get(i, READ) ;
           
            if ( i != count )
            {
                Record keySubTree = n.getHighRecord() ;     // high key in immediate child
                Record keyHere = records.get(i) ;           // key in this
               
                if ( keySubTree == null )
                    error("Node: %d: Can't get high record from %d", id, n.getId()) ;
               
                if ( keySubTree.getKey() == null )
                    error("Node: %d: Can't get high record is missing it's key from %d", id, n.getId()) ;
                   
                if ( keyHere == null )
                    error("Node: %d: record is null", id) ;
               
                if ( keyHere.getKey() == null )
                    error("Node: %d: Record key is null", id) ;
               
                if ( keyGT(keySubTree, keyHere) )
                    error("Node: %d: Child key %s is greater than this key %s", id, keySubTree, keyHere) ;
               
                Record keyMax = n.maxRecord() ;             // max key in subTree
                Record keyMin = n.minRecord() ;
               
                if ( keyNE(keyHere, keyMax) )
                    error("Node: %d: Key %s is not the max [%s] of the sub-tree idx=%d", id, keyHere, keyMax, i) ;
               
                if ( min != null && keyGT(min, keyMin) )
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.record.Record

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.