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

Examples of com.hp.hpl.jena.tdb.base.recordbuffer.RecordBufferPage


        }
       
        @Override
        public BPTreeRecords fromBlock(Block block)
        {
            RecordBufferPage rbp = recordBufferConverter.fromBlock(block) ;
            return new BPTreeRecords(bpTree, rbp) ;
        }
View Full Code Here


        }

        @Override
        public BPTreeRecords createFromBlock(Block block, BlockType bType)
        {
            RecordBufferPage rbp = recordBufferConverter.createFromBlock(block, bType) ;
            return new BPTreeRecords(bpTree, rbp) ;
        }
View Full Code Here

    }
   
    public RecordBufferPage getReadIterator(int id)
    {
        Block block = blockMgr.getReadIterator(id) ;
        RecordBufferPage page = pageFactory.fromBlock(block) ;
        return page ;
    }
View Full Code Here

        public RecordBufferPage createFromBlock(Block block, BlockType blkType)
        {
            if ( blkType != BlockType.RECORD_BLOCK )
                throw new RecordException("Not RECORD_BLOCK: "+blkType) ;
            // Initially empty
            RecordBufferPage rb = RecordBufferPage.createBlank(block, factory) ;
            return rb ;
        }
View Full Code Here

        @Override
        public RecordBufferPage fromBlock(Block block)
        {
            synchronized (block)    // [[TxTDB:TODO] needed? Right place?
            {
                RecordBufferPage rb = RecordBufferPage.format(block, factory) ;
//                int count = block.getByteBuffer().getInt(COUNT) ;
//                int linkId = block.getByteBuffer().getInt(LINK) ;
//                RecordBufferPage rb = new RecordBufferPage(block, linkId, factory, count) ;
                return rb ;
            }
View Full Code Here

   
    @Override
    public RecordBufferPage next()
    {
        if ( ! hasNext() ) throw new NoSuchElementException() ;
        RecordBufferPage rbp = recordBufferPage ;
        recordBufferPage = null ;
        return rbp ;
    }
View Full Code Here

            peekIter = null ;
            return false ;
        }
       
        slot = peekIter.next() ;
        RecordBufferPage nextSlot = peekIter.peekOrNull() ;
        // If null, no slot ahead so no linkage field to set.
        if ( nextSlot != null )
            // Set the slot to the id of the next one
            slot.setLink(nextSlot.getId()) ;
        return true ;
    }
View Full Code Here

   
    @Override
    public RecordBufferPage next()
    {
        if ( ! hasNext() ) throw new NoSuchElementException() ;
        RecordBufferPage rbp = slot ;
        slot = null ;
        return rbp ;
    }
View Full Code Here

        // Blocks in scan order
        try {
            while ( idx >= 0 )
            {
                if ( verbose ) System.out.printf("idx = %d\n", idx) ;
                RecordBufferPage page = recordPageMgr.getRead(idx) ;
                if ( verbose ) System.out.printf("%04d :: id=%04d -> link=%04d [count=%d, max=%d]\n", n, page.getId(), page.getLink(), page.getCount(), page.getMaxSize()) ;
                RecordBuffer rb = page.getRecordBuffer() ;
                if ( verbose ) System.out.printf("     :: %d %d\n", rb.getSize(), rb.maxSize() ) ;
                total += rb.size();
                idx = page.getLink() ;
                n++ ;
                recordPageMgr.release(page) ;
            }
        } catch (Exception ex)
        {
View Full Code Here

            peekIter = null ;
            return false ;
        }
       
        slot = peekIter.next() ;
        RecordBufferPage nextSlot = peekIter.peekOrNull() ;
        // If null, no slot ahead so no linkage field to set.
        if ( nextSlot != null )
            // Set the slot to the id of the next one
            slot.setLink(nextSlot.getId()) ;
        return true ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.recordbuffer.RecordBufferPage

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.