org.hibernate.search.backend
Class Workspace
java.lang.Object
org.hibernate.search.backend.Workspace
public class Workspace
- extends Object
Lucene workspace
This is not intended to be used in a multithreaded environment
One cannot execute modification through an IndexReader when an IndexWriter has been acquired on the same underlying directory
One cannot get an IndexWriter when an IndexReader have been acquired and modificed on the same underlying directory
The recommended approach is to execute all the modifications on the IndexReaders, clean()
}, and acquire the
index writers
- Author:
- Emmanuel Bernard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Workspace
public Workspace(Map<Class,DocumentBuilder<Object>> documentBuilders,
Map<DirectoryProvider,java.util.concurrent.locks.ReentrantLock> lockableDirectoryProviders)
getDocumentBuilder
public DocumentBuilder getDocumentBuilder(Class entity)
getIndexReader
public org.apache.lucene.index.IndexReader getIndexReader(Class entity)
getIndexWriter
public org.apache.lucene.index.IndexWriter getIndexWriter(Class entity)
clean
public void clean()
- release resources consumed in the workspace if any