lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject Add IndexWriter.doBeforeFlush()
Date Tue, 23 Feb 2010 11:55:32 GMT

Can we add to IW a doBeforeFlush(), similar to doAfterFlush(), which will
get called before flush actually happens (i.e., at the beginning of
flush())? IW.flush() is final and so I cannot override it, but I do take
advantage of doAfterFlush(). I need though a way to execute some code before
the flush begins ...

On that matter, can we turn doAfterFlush to protected? It's designed to be
an extension point, yet still package private. Since it does not include any
logic (as well as doBeforeFlush shouldn't), and all we'll need to guarantee
is that we'll call both before and after flush, I think it'll make sense to
make these two 'public' in nature, i.e. protected visibility.

What do you think?


View raw message