lucene-dev mailing list archives

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

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:

... 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:
For additional commands, e-mail:

View raw message