It's true there is now reference counting logic to determine when it's
really time to close an IndexReader, but, at that point doClose() is
still called so your custom logic should still be running, right? It
seems like your pattern ought to still be working?
If not, another alternative might be to override decRef() with your
own logic, or, you could externally hold your own reference to the
reader (call its incRef()) and then decRef() it when you're done.
That would probably be cleanest...
Mike
On Jun 29, 2008, at 11:51 AM, John Wang wrote:
Hi:
I had some code to do indexReader pooling to avoid open and close
on a
large index when doing lotsa searches. So I had a
FilteredIndexReader proxy
that overrides the doClose method to do nothing, and when I really
want to
close it, I call super.doClose(). This patter worked well for me
prior to
2.3. With 2.3, the close is doing the reference counting out side of
doClose, and since close is final, my pattern is broken.
Am I using the api incorrectly? how would I accomplish this task?
Thanks
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]