org.hibernate.search.backend.impl.lucene
Class LuceneBackendQueueProcessorFactory

java.lang.Object
  extended by org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessorFactory
All Implemented Interfaces:
BackendQueueProcessorFactory

public class LuceneBackendQueueProcessorFactory
extends Object
implements BackendQueueProcessorFactory

This will actually contain the Workspace and LuceneWork visitor implementation, reused per-DirectoryProvider. Both Workspace(s) and LuceneWorkVisitor(s) lifecycle are linked to the backend lifecycle (reused and shared by all transactions). The LuceneWorkVisitor(s) are stateless, the Workspace(s) are threadsafe.

Author:
Emmanuel Bernard, Sanne Grinovero

Constructor Summary
LuceneBackendQueueProcessorFactory()
           
 
Method Summary
 void close()
          Used to shutdown and eventually release resources.
 Runnable getProcessor(List<LuceneWork> queue)
          Return a runnable implementation responsible for processing the queue to a given backend.
 void initialize(Properties props, SearchFactoryImplementor searchFactoryImplementor)
          Used at startup, called once as first method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneBackendQueueProcessorFactory

public LuceneBackendQueueProcessorFactory()
Method Detail

initialize

public void initialize(Properties props,
                       SearchFactoryImplementor searchFactoryImplementor)
Description copied from interface: BackendQueueProcessorFactory
Used at startup, called once as first method.

Specified by:
initialize in interface BackendQueueProcessorFactory
Parameters:
props - all configuration properties
searchFactoryImplementor - the client

getProcessor

public Runnable getProcessor(List<LuceneWork> queue)
Description copied from interface: BackendQueueProcessorFactory
Return a runnable implementation responsible for processing the queue to a given backend.

Specified by:
getProcessor in interface BackendQueueProcessorFactory
Parameters:
queue - The work queue to process.
Returns:
Runnable which processes queue when started.

close

public void close()
Description copied from interface: BackendQueueProcessorFactory
Used to shutdown and eventually release resources. no other method should used after this one.

Specified by:
close in interface BackendQueueProcessorFactory