|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.search.backend.Workspace
public class Workspace
Lucene workspace for a DirectoryProvider.
Before usinggetIndexWriter(boolean) the lock must be acquired,
and resources must be closed before releasing the lock.
| Constructor Summary | |
|---|---|
Workspace(SearchFactoryImplementor searchFactoryImplementor,
DirectoryProvider<?> provider)
|
|
| Method Summary | ||
|---|---|---|
void |
closeIndexWriter()
Closes a previously opened IndexWriter. |
|
void |
commitIndexWriter()
Commits changes to a previously opened IndexWriter. |
|
void |
forceLockRelease()
Forces release of Directory lock. |
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(java.lang.String name)
|
|
|
getDocumentBuilder(java.lang.Class<T> entity)
|
|
java.util.Set<java.lang.Class<?>> |
getEntitiesInDirectory()
|
|
org.apache.lucene.index.IndexWriter |
getIndexWriter(boolean batchmode)
Gets the IndexWriter, opening one if needed. |
|
void |
incrementModificationCounter(int modCount)
Increment the counter of modification operations done on the index. |
|
void |
optimize()
Used by OptimizeLuceneWork after index optimization to flag that optimization has been forced. |
|
void |
optimizerPhase()
If optimization has not been forced give a chance to configured OptimizerStrategy to optimize the index. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Workspace(SearchFactoryImplementor searchFactoryImplementor,
DirectoryProvider<?> provider)
| Method Detail |
|---|
public <T> DocumentBuilderIndexedEntity<T> getDocumentBuilder(java.lang.Class<T> entity)
public org.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.String name)
public void optimizerPhase()
public void optimize()
OptimizeLuceneWork,
SearchFactory.optimize(),
SearchFactory.optimize(Class)public org.apache.lucene.index.IndexWriter getIndexWriter(boolean batchmode)
batchmode - when true the indexWriter settings for batch mode will be applied.
Ignored if IndexWriter is open already.
SearchException - on a IOException during index opening.public void commitIndexWriter()
SearchException - on IOException during Lucene close operation,
or if there is no IndexWriter to close.public void closeIndexWriter()
SearchException - on IOException during Lucene close operationpublic void incrementModificationCounter(int modCount)
modCount - the increment to add to the counter.public java.util.Set<java.lang.Class<?>> getEntitiesInDirectory()
public void forceLockRelease()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||