| java.lang.Object com.quadcap.sql.file.BlockPath
BlockPath | class BlockPath (Code) | | This class is used to locate a specified offset within a randomly
accessible BlockAccess object. The path has two
components, a logical component, p which specifies the offsets of the
block references needed to locate the block and position corresponding
to the selected byte, and a physical component r which contains
the block references of the blocks needed to locate the actual byte.
author: Stan Bailes |
Constructor Summary | |
public | BlockPath(BlockAccess a, long pos) Construct a new BlockPath to represent the specified byte in the
specified region. |
Method Summary | |
final public int | getBufPos() Return the byte offset within the leaf block where the designated
byte can be found. | final public int | getDepth() | final public Page | getLeafBlock() Return the block which actually contains the data. | final public long | getPos() | final public void | incr(long offset) Adjust this BlockPath to point to a new location, with a minimum
number of block accesses. | final public void | setPos(long newpos) | public String | toString() For debugging, return a displayable representation of this BlockPath. |
depth | int depth(Code) | | Depth of this path
|
pos | long pos(Code) | | Byte offset info 'a'
|
tp | int[] tp(Code) | | A temporary (logical) path
|
BlockPath | public BlockPath(BlockAccess a, long pos) throws IOException(Code) | | Construct a new BlockPath to represent the specified byte in the
specified region.
Parameters: a - the region into which the index is made Parameters: pos - the byte offset in the region |
getBufPos | final public int getBufPos()(Code) | | Return the byte offset within the leaf block where the designated
byte can be found.
|
getDepth | final public int getDepth()(Code) | | Return the depth of this path
|
getLeafBlock | final public Page getLeafBlock() throws IOException(Code) | | Return the block which actually contains the data. This is the
final block in the path.
NOTE: This block needs to have its reference count decremented
when you're done with it!!
|
getPos | final public long getPos()(Code) | | Return the current position referred to by this path
|
incr | final public void incr(long offset) throws IOException(Code) | | Adjust this BlockPath to point to a new location, with a minimum
number of block accesses.
Parameters: cnt - The offset from the current location |
setPos | final public void setPos(long newpos) throws IOException(Code) | | Return the current position referred to by this path
|
toString | public String toString()(Code) | | For debugging, return a displayable representation of this BlockPath.
|
|
|