Package com.atlassian.jira.index
Class DefaultIndexEngine
java.lang.Object
com.atlassian.jira.index.DefaultIndexEngine
- All Implemented Interfaces:
Closeable,Closeable,AutoCloseable
Thread-safe container that manages our current
IndexSearcher and Writer.
Gets passed searcher and writer factories that create new instances of these when required.
getSearcher() - returns an IndexSearcher with a frozen view of the current index; the client is responsible for
closing the IndexSearcher when finished. IndexSearcher are shared between clients. getSearcher() creates
a new IndexSearcher only if there was some changes on the index.
Clients which received a UnmanagedIndexSearcher via getSearcher() are responsible for closing
it via UnmanagedIndexSearcher.close().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow to perform an actual write to the writer.protected static classThread-safe holder of the current Writer -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclean()voidclose()Closes this stream and releases any system resources associated with it.voidwrite(Index.Operation operation)
-
Method Details
-
getSearcher
-
clean
public void clean() -
write
- Throws:
IOException
-
close
public void close()Description copied from interface:CloseableCloses this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
-