lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Hearn <m.he...@signal.QinetiQ.com>
Subject FSDirectory.makeLock() declared final
Date Fri, 27 Aug 2004 11:00:59 GMT
Hi,

I'm wondering why there are so many final methods in FSDirectory. In 
particular I'd like to customize the locking behaviour and was 
originally going to do that by subclassing FSDirectory and just 
overriding the makeLock() method, until I noticed that it was marked final.

I can't see any obvious reason for this. The usual motivation given is 
speed, but this article:

http://www-106.ibm.com/developerworks/java/library/j-jtp1029.html

... strongly implies that it doesn't make much difference at all, and 
the opinion of the writer is certainly that the losses outweigh the gains.

For now I'm just going to copy/paste the FSDirectory class into my 
program and customize it there. If speed is the motivation, does anybody 
have benchmarks to show that it really speeds things up?

thanks -mike

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


Mime
View raw message