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>
_slotFreedCallback
static byte
FM_BTREE
static byte
FM_DEBUG
static byte
FM_DEFAULT
static byte
FM_IX
static byte
FM_LEGACY_RAM
static byte
FM_RAM
static int
REMAINDER_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 byte
checkType(byte systemType)
static AbstractFreespaceManager
createNew(LocalObjectContainer file)
static AbstractFreespaceManager
createNew(LocalObjectContainer file, byte systemType)
void
debugCheckIntegrity()
protected int
discardLimit()
static int
initSlot(LocalObjectContainer file)
static void
migrate(FreespaceManager oldFM, FreespaceManager newFM)
void
migrateTo(FreespaceManager fm)
static boolean
migrationRequired(byte systemType)
void
slotFreed(Slot slot)
protected boolean
splitRemainder(int length)
int
totalFreespace()
-
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:
migrateTo
in interfaceFreespaceManager
-
totalFreespace
public int totalFreespace()
- Specified by:
totalFreespace
in 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:
slotFreed
in interfaceFreespaceManager
-
-