
July 2nd, 2008, 08:10 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
IndexReader.isDeleted synchronization
A possible solution to the IndexReader.isDeleted synchronization is to have
a delegate class that is different depending on the Java version. For Java
1.4 the class defaults to the synchronization used now. A Java 1.5 version
would use a volatile deletedDocs attribute. This would provide a backwards
compatible solution and a solution for Java versions with volatile working
that can avoid the use of synchronized.
|