Package com.atlassian.jira.index
Class WriterWithStats
java.lang.Object
com.atlassian.jira.index.WriterWithStats
- All Implemented Interfaces:
Closeable,Closeable,AutoCloseable
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDocuments(Collection<org.apache.lucene.document.Document> document) voidclose()Closes this stream and releases any system resources associated with it.voidcommit()voiddeleteDocuments(org.apache.lucene.index.Term identifyingTerm) longorg.apache.lucene.index.IndexWriterstatic com.atlassian.jira.index.WritermaybeWrap(com.atlassian.jira.index.WriterWrapper delegate, boolean isRamDirectory) voidoptimize()booleanreplaceDocumentsWithVersion(Collection<org.apache.lucene.document.Document> newDocuments) voidupdateDocumentConditionally(org.apache.lucene.index.Term identifyingTerm, org.apache.lucene.document.Document document, String optimisticLockField) voidupdateDocuments(org.apache.lucene.index.Term identifyingTerm, Collection<org.apache.lucene.document.Document> document) intupdateDocumentsWithVersion(Collection<org.apache.lucene.document.Document> newDocuments)
-
Method Details
-
maybeWrap
public static com.atlassian.jira.index.Writer maybeWrap(com.atlassian.jira.index.WriterWrapper delegate, boolean isRamDirectory) -
getLuceneWriter
public org.apache.lucene.index.IndexWriter getLuceneWriter() -
addDocuments
public void addDocuments(@Nonnull Collection<org.apache.lucene.document.Document> document) throws IOException - Throws:
IOException
-
deleteDocuments
public void deleteDocuments(@Nonnull org.apache.lucene.index.Term identifyingTerm) throws IOException - Throws:
IOException
-
updateDocuments
public void updateDocuments(@Nonnull org.apache.lucene.index.Term identifyingTerm, @Nonnull Collection<org.apache.lucene.document.Document> document) throws IOException - Throws:
IOException
-
updateDocumentConditionally
public void updateDocumentConditionally(@Nonnull org.apache.lucene.index.Term identifyingTerm, @Nonnull org.apache.lucene.document.Document document, @Nonnull String optimisticLockField) throws IOException - Throws:
IOException
-
updateDocumentsWithVersion
public int updateDocumentsWithVersion(@Nonnull Collection<org.apache.lucene.document.Document> newDocuments) throws IOException, IllegalStateException, IllegalArgumentException -
replaceDocumentsWithVersion
public boolean replaceDocumentsWithVersion(@Nonnull Collection<org.apache.lucene.document.Document> newDocuments) throws IOException, IllegalStateException, IllegalArgumentException -
optimize
- 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. -
commit
public void commit() -
getFlushPolicy
-
getCommitFrequency
public long getCommitFrequency()
-