|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.search.backend.impl.batchlucene.LuceneBatchBackend
public class LuceneBatchBackend
First EXPERIMENTAL BatchBackend; this is not meant to be used as a regular backend, only to apply batch changes to the index. Several threads are used to make changes to each index, so order of Work processing is not guaranteed.
Field Summary | |
---|---|
static java.lang.String |
CONCURRENT_WRITERS
|
Constructor Summary | |
---|---|
LuceneBatchBackend()
|
Method Summary | |
---|---|
void |
close()
Used to shutdown and release resources. |
void |
doWorkInSync(LuceneWork work)
Does one work in sync |
void |
enqueueAsyncWork(LuceneWork work)
Enqueues one work to be processed asynchronously |
void |
initialize(java.util.Properties cfg,
MassIndexerProgressMonitor monitor,
SearchFactoryImplementor searchFactoryImplementor)
Used at startup, called once as first method. |
void |
stopAndFlush(long timeout,
java.util.concurrent.TimeUnit unit)
Stops the background threads and flushes changes; Please note the timeout is applied to each index in sequence, so it might take as much time as timeout*directoryproviders |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONCURRENT_WRITERS
Constructor Detail |
---|
public LuceneBatchBackend()
Method Detail |
---|
public void initialize(java.util.Properties cfg, MassIndexerProgressMonitor monitor, SearchFactoryImplementor searchFactoryImplementor)
BatchBackend
initialize
in interface BatchBackend
cfg
- all configuration propertiessearchFactoryImplementor
- the clientpublic void enqueueAsyncWork(LuceneWork work) throws java.lang.InterruptedException
BatchBackend
enqueueAsyncWork
in interface BatchBackend
java.lang.InterruptedException
- if the current thread is interrupted while
waiting for the work queue to have enough space.public void doWorkInSync(LuceneWork work)
BatchBackend
doWorkInSync
in interface BatchBackend
public void stopAndFlush(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
stopAndFlush
in interface BatchBackend
java.lang.InterruptedException
- if the current thread is interrupted
while waiting for the enqueued tasks to be finished.public void close()
BatchBackend
close
in interface BatchBackend
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |