Package org.apache.lucene.index
Interface DocumentsWriter.FlushNotifications
-
- Enclosing class:
- DocumentsWriter
static interface DocumentsWriter.FlushNotifications
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterSegmentsFlushed()
Called after one or more segments were flushed to disk.void
deleteUnusedFiles(java.util.Collection<java.lang.String> files)
Called when files were written to disk that are not used anymore.void
flushFailed(SegmentInfo info)
Called when a segment failed to flush.void
onDeletesApplied()
Called once deletes have been applied either after a flush or on a deletes callvoid
onTicketBacklog()
Called once the DocumentsWriter ticket queue has a backlog.void
onTragicEvent(java.lang.Throwable event, java.lang.String message)
Should be called if a flush or an indexing operation caused a tragic / unrecoverable event.
-
-
-
Method Detail
-
deleteUnusedFiles
void deleteUnusedFiles(java.util.Collection<java.lang.String> files)
Called when files were written to disk that are not used anymore. It's the implementation's responsibility to clean these files up
-
flushFailed
void flushFailed(SegmentInfo info)
Called when a segment failed to flush.
-
afterSegmentsFlushed
void afterSegmentsFlushed() throws java.io.IOException
Called after one or more segments were flushed to disk.- Throws:
java.io.IOException
-
onTragicEvent
void onTragicEvent(java.lang.Throwable event, java.lang.String message)
Should be called if a flush or an indexing operation caused a tragic / unrecoverable event.
-
onDeletesApplied
void onDeletesApplied()
Called once deletes have been applied either after a flush or on a deletes call
-
onTicketBacklog
void onTicketBacklog()
Called once the DocumentsWriter ticket queue has a backlog. This means there is an inner thread that tries to publish flushed segments but can't keep up with the other threads flushing new segments. This likely requires other thread to forcefully purge the buffer to help publishing. This can't be done in-place since we might hold index writer locks when this is called. The caller must ensure that the purge happens without an index writer lock being held.
-
-