|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.index.utils.IndexSmokeTUtil<O>
public class IndexSmokeTUtil<O extends OBShort>
Main class that performs all sorts of tests on the indexes. Objects are inserted deleted verified for existence. Searches are always compared against sequential search.
| Field Summary | |
|---|---|
protected OBFactory<O> |
factory
|
static int |
maxSliceSize
|
| Constructor Summary | |
|---|---|
IndexSmokeTUtil(OBFactory<O> factory)
Creates a new smoke tester. |
|
| Method Summary | |
|---|---|
protected String |
debug(Iterator<OBResultShort<O>> it,
Index<O> index)
Prints debug info for the given priority queue. |
protected String |
debug(OBPriorityQueueShort<O> q,
Index<O> index)
|
void |
initIndex(IndexShort<O> index)
Initialize the index. |
static boolean |
isIn(int x,
int[] j)
if x is in j. |
static String |
parseLine(String line)
Parse a line in the slices file. |
void |
search(IndexShort<O> index,
short range,
short k)
Perform all the searches with |
void |
searchSequential(long max,
O o,
OBPriorityQueueShort<O> result,
IndexShort<O> index,
short range)
Sequential search. |
static boolean |
shouldProcessSlice(OBSlice x)
We only process slices of this size. |
void |
tIndex(IndexShort<O> index)
Test method for Creates a database, fills it with data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OBFactory<O extends OBShort> factory
public static int maxSliceSize
| Constructor Detail |
|---|
public IndexSmokeTUtil(OBFactory<O> factory)
throws IOException
IOException - If the properties file cannot be found.| Method Detail |
|---|
public void initIndex(IndexShort<O> index)
throws Exception
index - Index to be initialized.
Exception - If something goes wrong.
public void tIndex(IndexShort<O> index)
throws Exception
index - The index that will be tested
If - something goes wrong.
Exception
public void search(IndexShort<O> index,
short range,
short k)
throws Exception
x - the index that will be usedrange - k -
Exception
protected String debug(OBPriorityQueueShort<O> q,
Index<O> index)
throws IllegalIdException,
OBException,
InstantiationException,
IllegalAccessException
IllegalIdException
OBException
InstantiationException
IllegalAccessException
protected String debug(Iterator<OBResultShort<O>> it,
Index<O> index)
throws IllegalIdException,
OBException,
InstantiationException,
IllegalAccessException
IllegalAccessException
InstantiationException
OBException
IllegalIdException
public static boolean isIn(int x,
int[] j)
x - item to search.j - array to search.
public static boolean shouldProcessSlice(OBSlice x)
throws Exception
x - Slice
Exception - If something goes wrong.public static String parseLine(String line)
line - A line in the file
public void searchSequential(long max,
O o,
OBPriorityQueueShort<O> result,
IndexShort<O> index,
short range)
throws Exception
max - Search all the ids in the database until maxo - The object to searchresult - The queue were the results are storedindex - the index to searchrange - The range to employ
Exception - If something goes really bad.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||