Top Description Fields Constructors Methods
org.hsqldb.persist

public Class TableSpaceManagerBlocks

extends Object
implements TableSpaceManager
Class Inheritance
All Implemented Interfaces
org.hsqldb.persist.TableSpaceManager
Imports
org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.DoubleIntIndex, .DoubleLongIndex, .LongLookup

Manages allocation of space for rows.

Maintains a list of free file blocks with fixed capacity.

Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
2.3.0
Version
2.5.1

Field Summary

Modifier and TypeField and Description
private final int
pack-priv long
pack-priv long
pack-priv int
pack-priv final int
pack-priv long
pack-priv long
pack-priv boolean
pack-priv boolean
private DoubleLongIndex
private DoubleIntIndex
private long
private long
private long
private long
pack-priv final int
pack-priv final int
private DoubleIntIndex
pack-priv final DataSpaceManager

Constructor Summary

AccessConstructor and Description
public
TableSpaceManagerBlocks(DataSpaceManager spaceManager, int spaceId, int fileBlockSize, int capacity, int fileScale)

Method Summary

Modifier and TypeMethod and Description
public void
addFileBlock(long blockFreePos, long blockLimit)

Implements org.hsqldb.persist.TableSpaceManager.addFileBlock.

public int
public synchronized long
getFilePosition(int rowSize)

Implements org.hsqldb.persist.TableSpaceManager.getFilePosition.

Returns the position of a free block or throws

public long
private long
getNewBlock(long rowSize)

private boolean
getNewMainBlock(long rowSize)

public int
public boolean
public void
initialiseFileBlock(LongLookup spaceList, long blockFreePos, long blockLimit)

Implements org.hsqldb.persist.TableSpaceManager.initialiseFileBlock.

public boolean
public synchronized void
release(long pos, int rowSize)

Implements org.hsqldb.persist.TableSpaceManager.release.

Deallocates a deleted block

public void
private void
resetList(boolean full)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

capacityback to summary
private final int capacity
currentBlockFloorback to summary
pack-priv long currentBlockFloor
currentBlockLimitback to summary
pack-priv long currentBlockLimit
fileBlockIndexback to summary
pack-priv int fileBlockIndex
fileBlockSizeback to summary
pack-priv final int fileBlockSize
freshBlockFreePosback to summary
pack-priv long freshBlockFreePos
freshBlockLimitback to summary
pack-priv long freshBlockLimit
isInitialisedback to summary
pack-priv boolean isInitialised
isModifiedback to summary
pack-priv boolean isModified
oldLargeListback to summary
private DoubleLongIndex oldLargeList
oldListback to summary
private DoubleIntIndex oldList
releaseCountback to summary
private long releaseCount
requestCountback to summary
private long requestCount
requestGetCountback to summary
private long requestGetCount
requestSizeback to summary
private long requestSize
scaleback to summary
pack-priv final int scale
spaceIDback to summary
pack-priv final int spaceID
spaceListback to summary
private DoubleIntIndex spaceList
spaceManagerback to summary
pack-priv final DataSpaceManager spaceManager

Constructor Detail

TableSpaceManagerBlocksback to summary
public TableSpaceManagerBlocks(DataSpaceManager spaceManager, int spaceId, int fileBlockSize, int capacity, int fileScale)

Method Detail

addFileBlockback to summary
public void addFileBlock(long blockFreePos, long blockLimit)

Implements org.hsqldb.persist.TableSpaceManager.addFileBlock.

getFileBlockIndexback to summary
public int getFileBlockIndex()
getFilePositionback to summary
public synchronized long getFilePosition(int rowSize)

Implements org.hsqldb.persist.TableSpaceManager.getFilePosition.

Returns the position of a free block or throws

getLostBlocksSizeback to summary
public long getLostBlocksSize()

Implements org.hsqldb.persist.TableSpaceManager.getLostBlocksSize.

getNewBlockback to summary
private long getNewBlock(long rowSize)
getNewMainBlockback to summary
private boolean getNewMainBlock(long rowSize)
getSpaceIDback to summary
public int getSpaceID()

Implements org.hsqldb.persist.TableSpaceManager.getSpaceID.

hasFileRoomback to summary
public boolean hasFileRoom(long blockSize)

Implements org.hsqldb.persist.TableSpaceManager.hasFileRoom.

initialiseFileBlockback to summary
public void initialiseFileBlock(LongLookup spaceList, long blockFreePos, long blockLimit)

Implements org.hsqldb.persist.TableSpaceManager.initialiseFileBlock.

isDefaultSpaceback to summary
public boolean isDefaultSpace()

Implements org.hsqldb.persist.TableSpaceManager.isDefaultSpace.

releaseback to summary
public synchronized void release(long pos, int rowSize)

Implements org.hsqldb.persist.TableSpaceManager.release.

Doc from org.hsqldb.persist.TableSpaceManager.release.

Deallocates a deleted block

resetback to summary
public void reset()

Implements org.hsqldb.persist.TableSpaceManager.reset.

resetListback to summary
private void resetList(boolean full)
resetOldListback to summary
private void resetOldList()