Class IndexWriterProvider
- java.lang.Object
-
- org.hibernate.search.backend.lucene.lowlevel.writer.impl.IndexWriterProvider
-
public class IndexWriterProvider extends Object
- Author:
- Sanne Grinovero (C) 2011 Red Hat Inc.
-
-
Constructor Summary
Constructors Constructor Description IndexWriterProvider(String indexName, EventContext eventContext, DirectoryHolder directoryHolder, IndexWriterConfigSource configSource, TimingSource timingSource, int commitInterval, BackendThreads threads, FailureHandler failureHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Closes and drops any cached resources (index writer in particular).voidclearAfterFailure(Throwable throwable, Object failingOperation)Closes and drops any cached resources (index writer in particular).IndexWriterDelegatorImplgetOrCreate()IndexWriterDelegatorImplgetOrNull()
-
-
-
Constructor Detail
-
IndexWriterProvider
public IndexWriterProvider(String indexName, EventContext eventContext, DirectoryHolder directoryHolder, IndexWriterConfigSource configSource, TimingSource timingSource, int commitInterval, BackendThreads threads, FailureHandler failureHandler)
-
-
Method Detail
-
clear
public void clear() throws IOExceptionCloses and drops any cached resources (index writer in particular).Should be used when stopping the index.
- Throws:
IOException
-
clearAfterFailure
public void clearAfterFailure(Throwable throwable, Object failingOperation)
Closes and drops any cached resources (index writer in particular).Should be used to clean up upon error.
-
getOrNull
public IndexWriterDelegatorImpl getOrNull()
-
getOrCreate
public IndexWriterDelegatorImpl getOrCreate() throws IOException
- Throws:
IOException
-
-