@NotStorableClass public class HeapFileDataManager extends AbstractHeapDataManager implements IHeapRecordFactory
Modifier and Type | Field and Description |
---|---|
protected IHeapElementManager |
heapElementManager
the heap element manager, data record are accessible by position in file
|
CLEAR_STANDBY_MODIFICATION_FAILED, FAILED_READ_DATA_RECORD, FLUSH_FAILED, logger
Constructor and Description |
---|
HeapFileDataManager(HeapFileSetup setup,
boolean manageNodeIndex) |
ceilingDataRecordIdentifier, clear, clearStandbyModification, dataRecordIterator, deleteDataRecord, firstDataRecordIdentifier, floorDataRecordIdentifier, flush, freeSize, getDataRecordIdentifierSet, getNewDataRecordIdentifier, getNextFreeDataRecordIdentifier, getNumberOfDataRecord, getNumberOfFreeRecord, hasDataRecord, heapSize, higherDataRecordIdentifier, isServiceStarted, lastDataRecordIdentifier, lowerDataRecordIdentifier, nextDataRecordIdentifierImpl, readDataRecord, removeFirstDataRecord, setNextFreeDataRecordIdentifier, startService, stopService, stopService, usedSize, writeDataRecord
protected final IHeapElementManager heapElementManager
public HeapFileDataManager(HeapFileSetup setup, boolean manageNodeIndex) throws HeapException
HeapException
protected final void startServiceImpl(boolean removeFiles) throws HeapException
AbstractHeapDataManager
startServiceImpl
in class AbstractHeapDataManager
HeapException
protected void clearImpl() throws HeapException
clearImpl
in class AbstractHeapDataManager
HeapException
protected void removeFiles() throws HeapException
AbstractHeapDataManager
removeFiles
in class AbstractHeapDataManager
HeapException
protected void stopServiceImpl(boolean removeFiles) throws HeapException
AbstractHeapDataManager
stopServiceImpl
in class AbstractHeapDataManager
HeapException
public boolean writeDataRecordImpl(DataRecordIdentifier dataRecordIdentifier, byte[] data) throws HeapException
writeDataRecordImpl
in class AbstractHeapDataManager
HeapException
public boolean deleteDataRecordImpl(DataRecordIdentifier dataRecordIdentifier) throws HeapException
deleteDataRecordImpl
in class AbstractHeapDataManager
HeapException
protected void flushImp() throws HeapException
AbstractHeapDataManager
#updateHeapRecordImpl(DataRecordIdentifier, IHeapDataRecord)
flushImp
in class AbstractHeapDataManager
HeapException
protected void clearStandbyModificationImpl() throws HeapException
clearStandbyModificationImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier getNextFreeDataRecordIdentifierImpl() throws HeapException
getNextFreeDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected void setNextFreeDataRecordIdentifierImpl(DataRecordIdentifier dataRecordIdentifier) throws HeapException
setNextFreeDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier getNewDataRecordIdentifierImpl() throws HeapException
AbstractHeapDataManager
getNewDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier removeFirstDataRecordImpl() throws HeapException
removeFirstDataRecordImpl
in class AbstractHeapDataManager
HeapException
public byte[] readDataRecordImpl(DataRecordIdentifier dataRecordIdentifier) throws HeapException
readDataRecordImpl
in class AbstractHeapDataManager
HeapException
public IFileStorable createHeapRecord(IHeapElementManager heapElementManager, long positionInFile) throws HeapException
IHeapRecordFactory
createHeapRecord
in interface IHeapRecordFactory
HeapException
protected boolean hasDataRecordImpl(DataRecordIdentifier dataRecordIdentifier) throws HeapException
hasDataRecordImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier firstDataRecordIdentifierImpl() throws HeapException
firstDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
public DataRecordIdentifier nextDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
nextDataRecordIdentifier
in interface IHeapDataManager
nextDataRecordIdentifier
in class AbstractHeapDataManager
dataRecordIdentifier
- wich for next is requestedHeapException
protected DataRecordIdentifier lastDataRecordIdentifierImpl() throws HeapException
lastDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier lowerDataRecordIdentifierImpl(DataRecordIdentifier identifier) throws HeapException
lowerDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier floorDataRecordIdentifierImpl(DataRecordIdentifier identifier) throws HeapException
floorDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier ceilingDataRecordIdentifierImpl(DataRecordIdentifier identifier) throws HeapException
ceilingDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected DataRecordIdentifier higherDataRecordIdentifierImpl(DataRecordIdentifier identifier) throws HeapException
higherDataRecordIdentifierImpl
in class AbstractHeapDataManager
HeapException
protected void closeHeapManagerAfterException()
AbstractHeapDataManager
closeHeapManagerAfterException
in class AbstractHeapDataManager
public boolean isDataLost()
IHeapDataManager
isDataLost
in interface IHeapDataManager
@Fortest protected Set<DataRecordIdentifier> getDataRecordIdentifierSetImpl() throws HeapException
getDataRecordIdentifierSetImpl
in class AbstractHeapDataManager
HeapException
protected int getNumberOfDataRecordImpl() throws HeapException
getNumberOfDataRecordImpl
in class AbstractHeapDataManager
HeapException
protected int getNumberOfFreeRecordImpl() throws HeapException
getNumberOfFreeRecordImpl
in class AbstractHeapDataManager
HeapException
protected long heapSizeImpl() throws HeapException
heapSizeImpl
in class AbstractHeapDataManager
HeapException
protected long freeSizeImpl() throws HeapException
freeSizeImpl
in class AbstractHeapDataManager
HeapException
protected long usedSizeImpl() throws HeapException
usedSizeImpl
in class AbstractHeapDataManager
HeapException
public String backup(long identifier, int maxBackup) throws HeapException
backup
in interface IHeapDataManager
HeapException
public String getStorageFileName() throws HeapException
getStorageFileName
in interface IHeapDataManager
HeapException
protected Iterator<DataRecordIdentifier> dataRecordIteratorImpl()
dataRecordIteratorImpl
in class AbstractHeapDataManager
public void setDataRecordKeyManager(IDataRecordKeyManager dataRecordKeyComparator)
setDataRecordKeyManager
in interface IHeapDataManager
@Fortest public long getLastRecordPositionInFile() throws HeapException
IHeapDataManager
getLastRecordPositionInFile
in interface IHeapDataManager
HeapException
@Fortest public long getRecordPositionInfile(DataRecordIdentifier identifier) throws HeapException
IHeapDataManager
getRecordPositionInfile
in interface IHeapDataManager
HeapException
@Fortest public void accept(IRBTVisitor<DataRecordIdentifier> visitor) throws HeapException
visitor
- HeapException
@Fortest public IHeapElementManager getHeapElementManager()
@Fortest public RedBlackTree<Integer> getFreeNodeTree()
@Fortest public RedBlackTree<DataRecordIdentifier> getIdNodeTree()
Copyright © 2007-2012 Luc Peuvrier. All Rights Reserved.