@NotStorableClass public class DataBlock extends Object implements IDataBlock
Constructor and Description |
---|
DataBlock(DataBlockPage dataBlockPage,
int indexInDataBlockPage,
byte bits,
int minDataSize,
int maxDataSize) |
Modifier and Type | Method and Description |
---|---|
byte |
getBits() |
byte[] |
getData() |
DataBlockPage |
getDataBlockPage() |
int |
getIndexInDataBlockPage() |
int |
getIndexInLeafPage() |
int |
getMaxDataSize() |
int |
getMinDataSize() |
long |
getNextFreeDataBlockPositionOfFree()
make sense to be call only if this is a free data block
|
LeafPage |
getParentLeafPage() |
long |
getPositionInFile() |
void |
setData(byte[] data) |
void |
setNextFreeDataBlockPositionOfFree(long nextFreeDataBlockPosition)
the next free data block position is wrote on data, must be call only if
this is a free data block
|
void |
setParent(LeafPage parentLeafPage,
int indexInLeafPage) |
public DataBlock(DataBlockPage dataBlockPage, int indexInDataBlockPage, byte bits, int minDataSize, int maxDataSize)
public int getMinDataSize()
getMinDataSize
in interface IDataBlock
public int getMaxDataSize()
getMaxDataSize
in interface IDataBlock
public byte getBits()
getBits
in interface IDataBlock
public DataBlockPage getDataBlockPage()
public int getIndexInDataBlockPage()
getIndexInDataBlockPage
in interface IDataBlock
public void setData(byte[] data) throws HeapException
setData
in interface IDataBlock
HeapException
public byte[] getData() throws HeapException
getData
in interface IDataBlock
HeapException
public void setNextFreeDataBlockPositionOfFree(long nextFreeDataBlockPosition) throws HeapException
IDataBlock
setNextFreeDataBlockPositionOfFree
in interface IDataBlock
HeapException
public long getNextFreeDataBlockPositionOfFree() throws HeapException
IDataBlock
getNextFreeDataBlockPositionOfFree
in interface IDataBlock
HeapException
public long getPositionInFile()
getPositionInFile
in interface IDataBlock
public void setParent(LeafPage parentLeafPage, int indexInLeafPage)
setParent
in interface IDataBlock
public LeafPage getParentLeafPage()
getParentLeafPage
in interface IDataBlock
public int getIndexInLeafPage()
getIndexInLeafPage
in interface IDataBlock
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.