public class DocumentQueue extends Object implements Closeable, IndexingQueue
| Constructor and Description |
|---|
DocumentQueue(int maxQueueSize,
IndexTracker tracker,
Executor executor) |
DocumentQueue(int maxQueueSize,
IndexTracker tracker,
Executor executor,
org.apache.jackrabbit.oak.stats.StatisticsProvider sp) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc doc)
Adds the given doc to a queue with possible wait if queue is full.
|
void |
addAllSynchronously(Map<String,Collection<org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc>> docsPerIndex)
The docs are added directly to the index without any queuing
|
boolean |
addIfNotFullWithoutWait(org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc doc)
Adds the given doc to a queue without any wait
|
void |
close() |
void |
scheduleQueuedDocsProcessing()
Schedules the async processing of queued entries
|
void |
setExceptionHandler(Thread.UncaughtExceptionHandler delegate)
Delegate handled which can be used by test to check for
any exception occurring in queue processing
|
public DocumentQueue(int maxQueueSize,
IndexTracker tracker,
Executor executor)
public DocumentQueue(int maxQueueSize,
IndexTracker tracker,
Executor executor,
org.apache.jackrabbit.oak.stats.StatisticsProvider sp)
public boolean addIfNotFullWithoutWait(org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc doc)
IndexingQueueaddIfNotFullWithoutWait in interface IndexingQueuedoc - to be addedpublic boolean add(org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc doc)
IndexingQueueadd in interface IndexingQueuedoc - LuceneDoc to be addedpublic void scheduleQueuedDocsProcessing()
IndexingQueuescheduleQueuedDocsProcessing in interface IndexingQueuepublic void addAllSynchronously(Map<String,Collection<org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc>> docsPerIndex)
IndexingQueueaddAllSynchronously in interface IndexingQueuedocsPerIndex - map of LuceneDoc per index pathpublic void setExceptionHandler(Thread.UncaughtExceptionHandler delegate)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.