|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.ColocatePreloader
public class ColocatePreloader
A colocate preloader.
A colocate preloader dramatically improves performance when many colocates for words are needed, as in a KWIC display. It loads up large batches of colocates in advance instead of loading them one at a time.
Constructor Summary | |
---|---|
ColocatePreloader(PersistenceManager pm)
Creates a new colocate preloader. |
Method Summary | |
---|---|
void |
add(java.util.List words)
Adds a list of words to the preloader. |
void |
load(Word word,
int distance,
int lookahead)
Preloads colocates for words. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColocatePreloader(PersistenceManager pm)
pm
- Persistence manager. Method Detail |
---|
public void add(java.util.List words)
words
- List of words. public void load(Word word, int distance, int lookahead) throws PersistenceException
Loads the colocates preceding and following the word, plus preceding and following colocates for words following the word in its list.
word
- The word.distance
- The number of preceding and following
colocates to preload.lookahead
- This many additional words following the word
in its list also have their colocates preloaded.
PersistenceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |