publicsynchronized void
addEntry
(long id, long offset)
throws
Exception
hen a new entry is added to the data file(table), this should be called as well to update the index with it.
hen a new entry is added to the data file(table), this should be called as well to update the index with it.
Parameters: - indexFile -
- id -
- offset -
Throws: - java.lang.Exception -
public void
closeFile
()
public void
deleteEntry
(long id)
throws
Exception
Call this after removing an entry from the data(table)
This will remove it from the index as well.
Call this after removing an entry from the data(table) This will remove it from the index as well.
Parameters: - id -
Throws: - java.lang.Exception -
public long
getIndexValue
(long index)
Returns the position od a data row given it's index
Returns the position od a data row given it's index
Returns: Parameters: - index -
publicsynchronized long
nextVal
()
When adding a new entry, call this method to get the next unique index value.
When adding a new entry, call this method to get the next unique index value.
Returns:
publicsynchronized void
setDataOffset
(long id, long offset)
throws
Exception
Updates the offset of a data file row in the index
Updates the offset of a data file row in the index
Parameters: - index -
- value -
Throws: - java.lang.Exception -