Package com.caucho.db.block

Examples of com.caucho.db.block.Block.free()


  public void close()
  {
    if (_block != null) {
      Block block = _block;
      _block = null;
      block.free();
    }
  }

  /**
   * Updates the buffer.
View Full Code Here


    throws IOException
  {
    if (_block != null) {
      Block block = _block;
      _block = null;
      block.free();
    }

    long addr;

    int blockCount = (int) (_offset / BlockStore.BLOCK_SIZE);
View Full Code Here

      Block ptr = _store.readBlock(_store.addressToBlockId(ptrAddr));

      addr = readLong(ptr.getBuffer(), 8 * (blockCount - INODE_DIRECT_BLOCKS));

      ptr.free();
    }

    _block = _store.readBlock(_store.addressToBlockId(addr));
    _buffer = _block.getBuffer();

View Full Code Here

        Block block = store.allocateBlock();

        long blockAddr = BlockStore.blockIdToAddress(block.getBlockId());

        block.free();

        if (blockAddr == 0) {
          store.setCorrupted(true);

          throw new IllegalStateException(L.l("{0}: illegal block",
View Full Code Here

        int charSublen = sublen / 2;

        Block block = store.allocateBlock();
        long blockAddr = block.getBlockId();
        block.free();

        Block writeBlock = store.writeBlock(blockAddr, 0,
                                            buffer, offset, charSublen);
       
        xa.addUpdateBlock(writeBlock);
View Full Code Here

      long indAddr = readLong(inode, inodeOffset + (DIRECT_BLOCKS + 1) * 8);

      if (indAddr == 0) {
        Block block = store.allocateBlock();
        indAddr = block.getBlockId();
        block.free();

        writeLong(inode, inodeOffset + (DIRECT_BLOCKS + 1) * 8, indAddr);
      }

      int blockOffset = 8 * (blockCount - DIRECT_BLOCKS);
View Full Code Here

      if (dblIndAddr == 0) {
        Block block = store.allocateBlock();

        dblIndAddr = BlockStore.blockIdToAddress(block.getBlockId());

        block.free();

        Block writeBlock = store.writeBlockLong(indAddr, dblBlockIndex, dblIndAddr);
        xa.addUpdateBlock(writeBlock);
      }
View Full Code Here

    Block block = _block;
    _block = null;
    _buffer = null;

    if (block != null) {
      block.free();
    }
   
    _blockId = 0;
    _rowOffset = Integer.MAX_VALUE / 2;
    _queryContext = null;
View Full Code Here

    Block block = _block;
    _block = null;
    _buffer = null;

    if (block != null) {
      block.free();
    }

    _blockId = _table.firstRowBlock(_blockId + Table.BLOCK_SIZE);

    if (_blockId < 0) {
View Full Code Here

      Block block = _block;
      _block = null;
      _buffer = null;

      if (block != null) {
        block.free();
      }

      _block = _xa.readBlock(_table, _blockId);
      _buffer = _block.getBuffer();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.