public class TextLevelCheckQueue extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DISPOSE_FLAG |
static int |
NO_FLAG |
static int |
RESET_FLAG |
static int |
STOP_FLAG |
Modifier and Type | Method and Description |
---|---|
void |
addQueueEntry(DocumentCache.TextParagraph nStart,
DocumentCache.TextParagraph nEnd,
int nCache,
int nCheck,
String docId,
boolean overrideRunning)
Add a new entry to queue
add it only if the new entry is not identical with the last entry or the running
|
org.languagetool.openoffice.TextLevelCheckQueue.QueueEntry |
createQueueEntry(DocumentCache.TextParagraph nStart,
DocumentCache.TextParagraph nEnd,
int cacheNum,
int nCheck,
String docId) |
org.languagetool.openoffice.TextLevelCheckQueue.QueueEntry |
createQueueEntry(DocumentCache.TextParagraph nStart,
DocumentCache.TextParagraph nEnd,
int nCache,
int nCheck,
String docId,
boolean overrideRunning)
Create and give back a new queue entry
|
void |
interruptCheck(String docId,
boolean wait)
remove all entries for the disposed docId (gone document)
|
boolean |
isInterrupted()
gives back information if queue is interrupted
|
boolean |
isRunning()
gives back information if queue is running
|
boolean |
isWaiting()
gives back information if queue is waiting
|
void |
setReset()
Reset the queue
all entries are removed; LanguageTool is new initialized
|
void |
setStop()
Set a stop flag to get a definite ending of the iteration
|
void |
wakeupQueue(String docId)
wake up the waiting iteration of the queue for a specific document
|
public static final int NO_FLAG
public static final int RESET_FLAG
public static final int STOP_FLAG
public static final int DISPOSE_FLAG
public void addQueueEntry(DocumentCache.TextParagraph nStart, DocumentCache.TextParagraph nEnd, int nCache, int nCheck, String docId, boolean overrideRunning)
public org.languagetool.openoffice.TextLevelCheckQueue.QueueEntry createQueueEntry(DocumentCache.TextParagraph nStart, DocumentCache.TextParagraph nEnd, int nCache, int nCheck, String docId, boolean overrideRunning)
public org.languagetool.openoffice.TextLevelCheckQueue.QueueEntry createQueueEntry(DocumentCache.TextParagraph nStart, DocumentCache.TextParagraph nEnd, int cacheNum, int nCheck, String docId)
public void wakeupQueue(String docId)
public void setStop()
public void setReset()
public void interruptCheck(String docId, boolean wait)
docId
- public boolean isInterrupted()
public boolean isRunning()
public boolean isWaiting()