lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Can I still use SearcherManager in this situation?
Date Sat, 10 Nov 2012 05:49:05 GMT
On Thu, Nov 8, 2012 at 8:29 AM, Trejkaz <trejkaz@trypticon.org> wrote:
> It's not only protected... but the class is final as well (the method
> might as well be private so that it doesn't give a false sense of hope
> that it can be overridden.)
>
> I might have to clone the whole class just to make the method public.

What I have ended up doing is wrapping SearcherManager and putting in
my own locking logic borrowed from Lucene 4. So when I call
maybeRefresh(), I know only one thread is doing it, which means I know
the refresh will occur before the method returns. This seems to work
fine and avoids duplicating much code. Once we switch to Lucene 4, I
can throw away my wrapper class as the method names match those of
Lucene 4's SearcherManager.

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message