Package com.db4o.internal.freespace
Class AbstractFreespaceManager
- java.lang.Object
-
- com.db4o.internal.freespace.AbstractFreespaceManager
-
- All Implemented Interfaces:
FreespaceManager
- Direct Known Subclasses:
BTreeFreespaceManager,FreespaceManagerIx,InMemoryFreespaceManager
public abstract class AbstractFreespaceManager extends java.lang.Object implements FreespaceManager
-
-
Field Summary
Fields Modifier and Type Field Description protected Procedure4<Slot>_slotFreedCallbackstatic byteFM_BTREEstatic byteFM_DEBUGstatic byteFM_DEFAULTstatic byteFM_IXstatic byteFM_LEGACY_RAMstatic byteFM_RAMstatic intREMAINDER_SIZE_LIMIT
-
Constructor Summary
Constructors Constructor Description AbstractFreespaceManager(Procedure4<Slot> slotFreedCallback, int discardLimit, int remainderSizeLimit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static bytecheckType(byte systemType)static AbstractFreespaceManagercreateNew(LocalObjectContainer file)static AbstractFreespaceManagercreateNew(LocalObjectContainer file, byte systemType)voiddebugCheckIntegrity()protected intdiscardLimit()static intinitSlot(LocalObjectContainer file)static voidmigrate(FreespaceManager oldFM, FreespaceManager newFM)voidmigrateTo(FreespaceManager fm)static booleanmigrationRequired(byte systemType)voidslotFreed(Slot slot)protected booleansplitRemainder(int length)inttotalFreespace()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.db4o.internal.freespace.FreespaceManager
allocateSafeSlot, allocateSlot, allocateTransactionLogSlot, beginCommit, commit, endCommit, free, freeSafeSlot, freeSelf, isStarted, listener, read, slotCount, start, systemType, traverse, write
-
-
-
-
Field Detail
-
FM_DEBUG
public static final byte FM_DEBUG
- See Also:
- Constant Field Values
-
FM_DEFAULT
public static final byte FM_DEFAULT
- See Also:
- Constant Field Values
-
FM_LEGACY_RAM
public static final byte FM_LEGACY_RAM
- See Also:
- Constant Field Values
-
FM_RAM
public static final byte FM_RAM
- See Also:
- Constant Field Values
-
FM_IX
public static final byte FM_IX
- See Also:
- Constant Field Values
-
FM_BTREE
public static final byte FM_BTREE
- See Also:
- Constant Field Values
-
REMAINDER_SIZE_LIMIT
public static final int REMAINDER_SIZE_LIMIT
- See Also:
- Constant Field Values
-
_slotFreedCallback
protected Procedure4<Slot> _slotFreedCallback
-
-
Constructor Detail
-
AbstractFreespaceManager
public AbstractFreespaceManager(Procedure4<Slot> slotFreedCallback, int discardLimit, int remainderSizeLimit)
-
-
Method Detail
-
checkType
public static byte checkType(byte systemType)
-
createNew
public static AbstractFreespaceManager createNew(LocalObjectContainer file)
-
createNew
public static AbstractFreespaceManager createNew(LocalObjectContainer file, byte systemType)
-
initSlot
public static int initSlot(LocalObjectContainer file)
-
migrateTo
public void migrateTo(FreespaceManager fm)
- Specified by:
migrateToin interfaceFreespaceManager
-
totalFreespace
public int totalFreespace()
- Specified by:
totalFreespacein interfaceFreespaceManager
-
discardLimit
protected int discardLimit()
-
splitRemainder
protected final boolean splitRemainder(int length)
-
migrate
public static void migrate(FreespaceManager oldFM, FreespaceManager newFM)
-
debugCheckIntegrity
public void debugCheckIntegrity()
-
migrationRequired
public static boolean migrationRequired(byte systemType)
-
slotFreed
public void slotFreed(Slot slot)
- Specified by:
slotFreedin interfaceFreespaceManager
-
-