|
Mobios v0.91 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmobios.index.AbstractIndex
public abstract class AbstractIndex
The primary interface for a distance-based index. Through AbstractIndex, the user can build a database index, or read a pre-built index from a file, and then do the search.
| Constructor Summary | |
|---|---|
AbstractIndex(File mobiosDataDir,
String fileName,
List<? extends IndexObject> data,
Metric metric,
Level debugLevel)
The constructor in common use. |
|
| Method Summary | |
|---|---|
void |
close()
Closes anything used internally that needs to be closed. |
void |
destroy()
Deletes the index from the file, and also release it from memory. |
List<IndexObject> |
getAllPoints()
Returns all the data points in the index |
Metric |
getMetric()
|
void |
initAndOpenOIOM(File dir,
boolean readOnly)
Initializes and opens the ObjectIOManager for this index. |
void |
preLoad(int level)
When a lot of queries are to be answered, for the sake of performance, it is a good idea to have the top levels of the index tree reside in memory. |
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface mobios.index.Index |
|---|
getOIOM, getRootAddress, search |
| Constructor Detail |
|---|
public AbstractIndex(File mobiosDataDir,
String fileName,
List<? extends IndexObject> data,
Metric metric,
Level debugLevel)
ObjectIOManager, and defines the metric and debug level to use when building an index.
fileName - data - metric - debugLevel - | Method Detail |
|---|
public void initAndOpenOIOM(File dir,
boolean readOnly)
ObjectIOManager for this index.
readOnly - public Metric getMetric()
getMetric in interface Indexpublic int size()
size in interface Indexpublic void preLoad(int level)
Index
preLoad in interface Indexlevel - number of levels, from the root, to be pre-loaded into memory.public List<IndexObject> getAllPoints()
Index
getAllPoints in interface Index
public void close()
throws IOException
Index
close in interface IndexIOException
public void destroy()
throws IOException
Index
destroy in interface IndexIOException
|
Mobios v0.91 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||