lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <>
Subject Re: FSDirectory.makeLock() declared final
Date Mon, 30 Aug 2004 11:37:47 GMT
Mike Hearn wrote:
> 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:
> ... 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?

I am sure the motivation is not speed. FSDirectory itself is final.
Since it is final one can always rely on its behaviour and on the
locking mechanism which is kind of central to Lucene.

However, I do not have very strong feelings for leaving it final.
Lets see what others think.


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

View raw message