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

Examples of com.hp.hpl.jena.tdb.base.block.Block


        if ( blkSize > 0 && blkSize != this.blockSize )
            throw new FileException("Fixed blocksize only: request= "+blkSize+"fixed size="+this.blockSize) ;
        int id = allocateId() ;
        ByteBuffer bb = getByteBuffer(id) ;
        bb.position(0) ;
        Block block = new Block(id, bb) ;
        return block ;
    }
View Full Code Here


    {
        check(id) ;
        checkIfClosed() ;
        ByteBuffer bb = getByteBuffer(id) ;
        bb.position(0) ;
        Block block = new Block(id, bb) ;
        return block ;
    }
View Full Code Here

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

                // [TxTDB:PATCH-UP]
                // Direct: blkMgr.write(e.getBlock()) would work.
                // Mapped: need to copy over the bytes.
               
                BlockMgr blkMgr = mgrs.get(e.getFileRef()) ;
                Block blk = e.getBlock() ;
                log.debug("Replay: {} {}",e.getFileRef(), blk) ;
                blk.setModified(true) ;
                blkMgr.overwrite(blk) ;
                return true ;
            }  
            case Buffer:
            {
View Full Code Here

//    public int allocateId()           { return blockMgr.allocateId() ; }
   
    /** Allocate a new thing */
    public T create(BlockType bType)
    {
        Block block = blockMgr.allocate(-1) ;
        block.setModified(true) ;
        T page = pageFactory.createFromBlock(block, bType) ;
        return page ;
    }
View Full Code Here

        return page ;
    }
   
    public T getWrite(int id)
    {
        Block block = blockMgr.getWrite(id) ;
        block.setModified(true) ;
        T page = pageFactory.fromBlock(block) ;
        return page ;
    }
View Full Code Here

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

    }

    @Override
    public Block allocWrite(int maxBytes)
    {
        Block blk = other.allocWrite(maxBytes) ;
        info("allocWrite("+maxBytes+") -> "+blk.getId()) ;
        return blk ;
    }
View Full Code Here

    {
        // Catch updates to non-transactioned datasetgraph.  Check in BlockMgrJournal instead.
//        if ( ! page.getBackingBlock().isModified() )
//            warn("Page for block "+page.getBackingBlock().getId()+" not modified") ;
       
        Block blk = pageFactory.toBlock(page) ;
        blockMgr.write(blk) ;
    }
View Full Code Here

        blockMgr.write(blk) ;
    }

    public void release(Page page)
    {
        Block block = page.getBackingBlock() ;
        blockMgr.release(block) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.block.Block

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.