API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.persistance. JOTFSIndex View Source
Author(s)
tcolar
Since
Version
Serial
Hierarchy
 Object
      JOTFSIndex
Implements
Subclasses
Description
public class JOTFSIndex
See also:   
Constructors
public JOTFSIndex ()
Methods
Hide/Show inherited methods
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.
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.
public long getIndexValue (long index)
  Returns the position od a data row given it's index
publicsynchronized long nextVal ()
  When adding a new entry, call this method to get the next unique index value.
publicsynchronized void setDataOffset (long id, long offset) throws Exception
  Updates the offset of a data file row in the index
public void setFile (RandomAccessFile indexFile)
  Sets the index file
public void setIndexIndexOffset (long id, long indexPos)
  Updates the IndexIndex
Fields
Hide/Show inherited fields
public long highestId
Stores he current highest ID found in the data file, so we can get the next unique higher value using nextval()
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar