On Sun, Dec 11, 2011 at 2:23 AM, Shai Erera <ser...@gmail.com> wrote:
> Hi
>
> I would like to introduce a RefCount interface with the methods: incRef(),
> tryIncRef(), decRef() and getRefCount().

I dunno, I'm not really sure we should encourage adding more reference
counting to Lucene (I think we should discourage instead!)

>
> Also, I think it will be good if IndexSearcher implements this interface
> too, delegating calls to its underlying indexReader.

Lets please not do this!

> Because today it seems
> very awkward to me that if I want to write a SearcherManager-like object,
> which manages IndexSearchers and essentially keeps track of their
> references, I need to know that I should call
> s.getIndexReader().inc/decRef().

I don't think its awkward, maybe instead you call yours ReaderManager
and always return a new IndexSearcher, or other possibilities.

-- 
lucidimagination.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to