org.hsqldb.persist
Class TableSpaceManagerBlocks
- java.lang.Object
-
- org.hsqldb.persist.TableSpaceManagerBlocks
-
- All Implemented Interfaces:
- TableSpaceManager
public class TableSpaceManagerBlocks extends java.lang.Object implements TableSpaceManager
Manages allocation of space for rows.Maintains a list of free file blocks with fixed capacity.
- Since:
- 2.3.0
-
-
Constructor Summary
Constructors Constructor and Description TableSpaceManagerBlocks(DataSpaceManager spaceManager, int tableId, int fileBlockSize, int capacity, int fileScale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddFileBlock(long blockFreePos, long blockLimit)longgetFilePosition(long rowSize, boolean asBlocks)Returns the position of a free block or 0.longgetLostBlocksSize()intgetSpaceID()booleanhasFileRoom(long blockSize)voidinitialiseFileBlock(DoubleIntIndex spaceList, long blockFreePos, long blockLimit)booleanisDefaultSpace()voidrelease(long pos, int rowSize)Deallocates a deleted blockvoidreset()
-
-
-
Constructor Detail
-
TableSpaceManagerBlocks
public TableSpaceManagerBlocks(DataSpaceManager spaceManager, int tableId, int fileBlockSize, int capacity, int fileScale)
-
-
Method Detail
-
hasFileRoom
public boolean hasFileRoom(long blockSize)
- Specified by:
hasFileRoomin interfaceTableSpaceManager
-
addFileBlock
public void addFileBlock(long blockFreePos, long blockLimit)- Specified by:
addFileBlockin interfaceTableSpaceManager
-
initialiseFileBlock
public void initialiseFileBlock(DoubleIntIndex spaceList, long blockFreePos, long blockLimit)
- Specified by:
initialiseFileBlockin interfaceTableSpaceManager
-
getSpaceID
public int getSpaceID()
- Specified by:
getSpaceIDin interfaceTableSpaceManager
-
release
public void release(long pos, int rowSize)Description copied from interface:TableSpaceManagerDeallocates a deleted block- Specified by:
releasein interfaceTableSpaceManager
-
getFilePosition
public long getFilePosition(long rowSize, boolean asBlocks)Returns the position of a free block or 0.- Specified by:
getFilePositionin interfaceTableSpaceManager
-
reset
public void reset()
- Specified by:
resetin interfaceTableSpaceManager
-
getLostBlocksSize
public long getLostBlocksSize()
- Specified by:
getLostBlocksSizein interfaceTableSpaceManager
-
isDefaultSpace
public boolean isDefaultSpace()
- Specified by:
isDefaultSpacein interfaceTableSpaceManager
-
-
DataMelt 3.0 © DataMelt by jWork.ORG