public interface IHeapDataManager
| Modifier and Type | Method and Description |
|---|---|
String |
backup(long identifier,
int maxBackup) |
DataRecordIdentifier |
ceilingDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) |
void |
clear()
clear the heap content.
|
void |
clearStandbyModification()
clear creation, modification, and deletion to do on the heap.
|
Iterator<DataRecordIdentifier> |
dataRecordIterator() |
boolean |
deleteDataRecord(DataRecordIdentifier dataRecordIdentifier)
delete an existing data record knowing its identifier.
|
DataRecordIdentifier |
firstDataRecordIdentifier() |
DataRecordIdentifier |
floorDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) |
void |
flush()
flush creation, modification, and deletion to the heap
the heap is updated. |
long |
freeSize()
get heap total free size in bytes.
|
Set<DataRecordIdentifier> |
getDataRecordIdentifierSet()
for test purpose
|
long |
getLastRecordPositionInFile()
for test purpose
|
DataRecordIdentifier |
getNewDataRecordIdentifier()
to get a new data identifier for data record creation: return the next
free data record identifier and internally increment the next free data
record identifier
when created #readHeapDataRecord(DataRecordIdentifier) can be
used for the data record identifierflush() must be call to store the modification. |
DataRecordIdentifier |
getNextFreeDataRecordIdentifier()
get the next free data record identifier
|
int |
getNumberOfDataRecord()
get number of data record in heap file.
|
int |
getNumberOfFreeRecord()
get number of free record in heap file.
|
long |
getRecordPositionInfile(DataRecordIdentifier identifier)
for test purpose
|
String |
getStorageFileName() |
boolean |
hasDataRecord(DataRecordIdentifier dataRecordIdentifier)
to check if have data record for a data record identifier.
|
long |
heapSize()
get heap total size in bytes.
|
DataRecordIdentifier |
higherDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) |
boolean |
isDataLost()
return true if data lost after file stable state reconstruction.
|
boolean |
isServiceStarted() |
DataRecordIdentifier |
lastDataRecordIdentifier() |
DataRecordIdentifier |
lowerDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) |
DataRecordIdentifier |
nextDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) |
byte[] |
readDataRecord(DataRecordIdentifier dataRecordIdentifier)
read data for a data record.
|
DataRecordIdentifier |
removeFirstDataRecord()
remove first data record and return its data record identifier.
|
void |
setDataRecordKeyManager(IDataRecordKeyManager dataRecordKeyComparator) |
void |
setNextFreeDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier)
set the next free data record identifier.
|
void |
startService(boolean removeFiles)
start heap data manager service.
|
void |
stopService()
stop heap data manager service, do not flush in file any modification.
|
void |
stopService(boolean removeFiles) |
long |
usedSize()
get heap total used size in bytes.
|
boolean |
writeDataRecord(DataRecordIdentifier dataRecordIdentifier,
byte[] data)
write data record.
|
boolean isDataLost()
void startService(boolean removeFiles)
throws HeapException
removeFiles - true if remove files before open common initialization at
constructionHeapException - read/write error, file restored from stable backup, file
management is not opened, no file in stable statevoid stopService()
throws HeapException
HeapExceptionvoid stopService(boolean removeFiles)
throws HeapException
HeapExceptionboolean isServiceStarted()
void clear()
throws HeapException
HeapExceptionDataRecordIdentifier getNextFreeDataRecordIdentifier() throws HeapException
HeapExceptionvoid setNextFreeDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
flush() must be call to store the modification.dataRecordIdentifier - the next free data record identifierHeapExceptionDataRecordIdentifier getNewDataRecordIdentifier() throws HeapException
#readHeapDataRecord(DataRecordIdentifier) can be
used for the data record identifierflush() must be call to store the modification.HeapExceptionboolean hasDataRecord(DataRecordIdentifier dataRecordIdentifier) throws HeapException
nodeIdentifier - the data record identifierHeapExceptionbyte[] readDataRecord(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - data record to read identifierHeapExceptionboolean writeDataRecord(DataRecordIdentifier dataRecordIdentifier, byte[] data) throws HeapException
dataRecordIdentifier - data record to write identifierdata - the data to writeHeapExceptionboolean deleteDataRecord(DataRecordIdentifier dataRecordIdentifier) throws HeapException
flush() must be call to store the modification.dataRecordIdentifier - data record to delete identifierHeapExceptionDataRecordIdentifier firstDataRecordIdentifier() throws HeapException
HeapExceptionDataRecordIdentifier nextDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - wich for next is requestedHeapExceptionDataRecordIdentifier lastDataRecordIdentifier() throws HeapException
HeapExceptionDataRecordIdentifier lowerDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - the keynull if there is no such key.HeapExceptionDataRecordIdentifier floorDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - the keykey, or
null if there is no such keyHeapExceptionDataRecordIdentifier ceilingDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - the keykey, or
null if there is no such keyHeapExceptionDataRecordIdentifier higherDataRecordIdentifier(DataRecordIdentifier dataRecordIdentifier) throws HeapException
dataRecordIdentifier - the keykey, or null if there
is no such keyHeapExceptionDataRecordIdentifier removeFirstDataRecord() throws HeapException
flush() must be call to store the modification.HeapExceptionvoid flush()
throws HeapException
HeapExceptionvoid clearStandbyModification()
throws HeapException
HeapExceptionvoid setDataRecordKeyManager(IDataRecordKeyManager dataRecordKeyComparator) throws HeapException
HeapExceptionint getNumberOfDataRecord()
throws HeapException
HeapExceptionint getNumberOfFreeRecord()
throws HeapException
HeapExceptionlong heapSize()
throws HeapException
HeapExceptionlong freeSize()
throws HeapException
HeapExceptionlong usedSize()
throws HeapException
HeapExceptionString backup(long identifier, int maxBackup) throws HeapException
HeapExceptionString getStorageFileName() throws HeapException
HeapException@Fortest Set<DataRecordIdentifier> getDataRecordIdentifierSet() throws HeapException
HeapExceptionIterator<DataRecordIdentifier> dataRecordIterator() throws HeapException
HeapException@Fortest long getRecordPositionInfile(DataRecordIdentifier identifier) throws HeapException
identifier - HeapException@Fortest long getLastRecordPositionInFile() throws HeapException
HeapExceptionCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.