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

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


        int tmp = (idx >>> (bitLen-bucket.getTrieBitLen())) ;
        if ( tmp != bucket.getTrieValue())
            error("[%d] Bucket %d : hash prefix 0x%X, expected 0x%X : %s", idx, bucket.getId(), bucket.getTrieValue(), tmp, bucket) ;
       
        // Check the contents.
        Record prevKey = Record.NO_REC ;
        for ( int i = 0 ; i < bucket.getCount() ; i++ )
        {
            Record rec = bucket.get(i) ;
            if ( prevKey != Record.NO_REC && Record.keyLT(rec,prevKey) )
                error("[%d] Bucket %d: Not sorted (slot %d) : %s", idx, bucket.getId(), i, bucket) ;
            prevKey = rec ;
            int x = trieKey(rec, bucket.getTrieBitLen()) ;
            // Check the key is bucket-compatible.
View Full Code Here


    public static Record search(BPTreeNode root, Record rec)
    {
        root.internalCheckNodeDeep() ;
        if ( root.id != 0 )
            throw new BPTreeException("Search not starting from the root: "+root) ;
        Record r = root.internalSearch(rec) ;
        return r ;
    }
View Full Code Here

            splitRoot(root) ;
            if ( DumpTree ) root.dump() ;
        }
       
        // Root ready - call insert proper.
        Record result = root.internalInsert(record) ;
       
        root.internalCheckNodeDeep() ;
   
        if ( logging() )
        {
View Full Code Here

        {
            // Special case.  Just a records block.  Allow that to go too small.
            BPTreePage page = root.get(0, WRITE) ;
            if ( CheckingNode && ! ( page instanceof BPTreeRecords ) )
                root.error("Zero size leaf root but not pointing a records block") ;
            Record r = page.internalDelete(rec) ;
            page.release() ;
            return r ;
        }
       
        // Entry: checkNodeDeep() ;
        Record v = root.internalDelete(rec) ;

        // Fix root in case it became empty in deletion process.
        if ( ! root.isLeaf && root.count == 0 )
        {
            root.reduceRoot() ;
View Full Code Here

    @Override
    protected Record maxRecord()
    {
        BPTreePage page = get(count, READ) ;
        Record r = page.maxRecord() ;
        page.release() ;
        return r ;
    }
View Full Code Here

    @Override
    protected Record minRecord()
    {
        BPTreePage page = get(0, READ) ;
        Record r = page.minRecord() ;
        page.release() ;
        return r ;
    }
View Full Code Here

    @Override final
    Record internalSearch(Record rec)
    {
        if ( CheckingNode ) internalCheckNode() ;
        BPTreePage page = findHere(rec) ;
        Record r = page.internalSearch(rec) ;
        page.release() ;
        return r ;
    }
View Full Code Here

                page = get(idx, READ) ;
            }
            internalCheckNode() ;
        }

        Record r = page.internalInsert(record) ;
        page.release() ;
        return r ;
    }
View Full Code Here

        internalCheckNodeDeep() ;
       
        promote() ;
        y.promote() ;
       
        Record splitKey = y.getSplitKey() ;
        splitKey = keyRecord(splitKey) ;
       
        if ( logging )
            log.debug(format("Split key: %s", splitKey)) ;

        BPTreePage z = y.split();
        if ( logging )
        {
            log.debug(format("Split: %s", y)) ;
            log.debug(format("Split: %s", z)) ;
        }
       
        // Key only.
        if ( splitKey.hasSeparateValue() )
        {
            // [Issue: FREC]
            // This creates a empty (null-byte-initialized) value array.
            splitKey = params.getKeyFactory().create(splitKey.getKey()) ;

            // Better: but an on-disk change. This is key only.
            // splitKey = params.getKeyFactory().createKeyOnly(splitKey) ;
        }       
       
View Full Code Here

   
    @Override final
    Record getSplitKey()
    {
        int ix = params.SplitIndex ;
        Record split = records.get(ix) ;
        return split ;
    }
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.