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)
IndexingQueue
addIfNotFullWithoutWait
in interface IndexingQueue
doc
- to be addedpublic boolean add(org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc doc)
IndexingQueue
add
in interface IndexingQueue
doc
- LuceneDoc to be addedpublic void scheduleQueuedDocsProcessing()
IndexingQueue
scheduleQueuedDocsProcessing
in interface IndexingQueue
public void addAllSynchronously(Map<String,Collection<org.apache.jackrabbit.oak.plugins.index.lucene.hybrid.LuceneDoc>> docsPerIndex)
IndexingQueue
addAllSynchronously
in interface IndexingQueue
docsPerIndex
- map of LuceneDoc per index pathpublic void setExceptionHandler(Thread.UncaughtExceptionHandler delegate)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.