lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Immutable OpenBitSet?
Date Wed, 27 Apr 2011 19:35:36 GMT
This would be very useful to have, but I don't think Lucene has it
now.  Maybe Solr does?  If not, please submit a patch :)

Or, maybe try  I think the focus
there is compressed docID sets (in RAM), so I'm not sure you'll find
something there... but, maybe?


On Wed, Apr 27, 2011 at 2:28 PM, Nader, John P <> wrote:
> Hello,
> We have an application that relies heavily on caching OpenBitSets for reuse across multiple
threads, and therefore multiple threads.  I am looking into ways for making this both efficient
and thread safe.  In Java, the Immutable pattern is the most efficient way to make a cached
object thread safe, because it does not require synchronization overhead.  Unfortunately,
this would require an implementation of OpenBitSet with the 'bits' and 'wlen' fields declared
as final, and all mutator methods throwing unsupported.  I can certainly extend the class
to override the methods, but the fields cannot be overridden as final.
> Are there any suggestions of the forum?  Possibly other Lucene classes to solve this
problem?  Or other solutions?
> I'm just looking for ideas.  Thanks.
> -John

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message