@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 IDataBlockpublic int getMaxDataSize()
getMaxDataSize in interface IDataBlockpublic byte getBits()
getBits in interface IDataBlockpublic DataBlockPage getDataBlockPage()
public int getIndexInDataBlockPage()
getIndexInDataBlockPage in interface IDataBlockpublic void setData(byte[] data)
throws HeapException
setData in interface IDataBlockHeapExceptionpublic byte[] getData()
throws HeapException
getData in interface IDataBlockHeapExceptionpublic void setNextFreeDataBlockPositionOfFree(long nextFreeDataBlockPosition)
throws HeapException
IDataBlocksetNextFreeDataBlockPositionOfFree in interface IDataBlockHeapExceptionpublic long getNextFreeDataBlockPositionOfFree()
throws HeapException
IDataBlockgetNextFreeDataBlockPositionOfFree in interface IDataBlockHeapExceptionpublic long getPositionInFile()
getPositionInFile in interface IDataBlockpublic void setParent(LeafPage parentLeafPage, int indexInLeafPage)
setParent in interface IDataBlockpublic LeafPage getParentLeafPage()
getParentLeafPage in interface IDataBlockpublic int getIndexInLeafPage()
getIndexInLeafPage in interface IDataBlockCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.