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

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


    {
        // NB: If we are in a stack of BlockMgrs, after a transaction has committed,
        // we would be called via getRead and the upper Blockgr does the promotion.
        checkActive() ;
        checkIfClosed() ;
        Block block = localBlock(id) ;
        if ( block != null )
            return block ;
       
        // Get-as-read.
        block = blockMgr.getRead(id) ;
View Full Code Here


    @Override
    public Block allocWrite(int maxBytes)
    {
        if ( passthrough ) return base.allocWrite(maxBytes) ;
        Block block = transObjects.allocWrite(maxBytes) ;
        block = new Block(block.getId()+otherAllocOffset, block.getByteBuffer()) ;
        return block ;
    }
View Full Code Here

    @Override
    public void completeWrite(Block block)
    {
        if ( passthrough ) { base.completeWrite(block) ; return ; }
        block = new Block(block.getId()-otherAllocOffset, block.getByteBuffer()) ;
        transObjects.completeWrite(block) ;
    }
View Full Code Here

   
    @Override
    public void abortWrite(Block block)
    {
        if ( passthrough ) { base.abortWrite(block) ; return ; }
        block = new Block(block.getId()-otherAllocOffset, block.getByteBuffer()) ;
        transObjects.abortWrite(block) ;
    }
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

    {
        // 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

        Log.warn(this, string) ;
    }
   
    public void free(Page page)
    {
        Block block = page.getBackingBlock() ;
        blockMgr.free(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.