p2ps.imp.discovery.cache
Class FileIndexTable
java.lang.Object
p2ps.imp.discovery.cache.FileIndexTable
- public class FileIndexTable
- extends java.lang.Object
A table of indexes keyed by id
- Version:
- $Revision: 295 $
- Author:
- Ian Wang
|
Method Summary |
int |
addIndex(int index)
Adds an index to the FileIndexTable |
int |
getIndex(int id)
|
int |
removeIndex(int id)
Removes an index from the FileIndexTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TABLE_BLOCK_SIZE
public static final int DEFAULT_TABLE_BLOCK_SIZE
- See Also:
- Constant Field Values
FileIndexTable
public FileIndexTable()
FileIndexTable
public FileIndexTable(int blocksize)
addIndex
public int addIndex(int index)
- Adds an index to the FileIndexTable
- Returns:
- an id for the index
getIndex
public int getIndex(int id)
- Returns:
- the index at the specified id, or -1 if deleted/doesn't exist
removeIndex
public int removeIndex(int id)
- Removes an index from the FileIndexTable
- Returns:
- the index at the specified id, or -1 if deleted/doesn't exist