lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nader, John P" <john.na...@cengage.com>
Subject Immutable OpenBitSet?
Date Wed, 27 Apr 2011 18:28:34 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message