Regarding final - my guess is that Doug didn't want people to inherit things that shouldn't be altered, plus I believe at one point in time Java compiler was relying on 'final' to streamline method calls, instance vars, classes, etc....to improve performance. This is a guess.
Otis --- Stas Chetvertkov <[EMAIL PROTECTED]> wrote: > Well... there is one thing with my solution. I implemented it using > native > code since I found no way to do it in Java :( > > Here is an excerpt from 'man 2 creat': > > ...O_EXCL is broken on NFS file systems, programs which rely on it > for > performing locking tasks will contain a race condition. The solution > for > performing atomic file locking using a lockfile is to create a unique > file > on the same fs (e.g., incorporating hostname and pid), use link(2) > to > make a link to the lockfile. If link() returns 0, the lock is > successful. > Otherwise, use stat(2) on the unique file to check if its link count > has > increased to 2, in which case the lock is also successful.... > > This is exactly what I did for locking. I am attaching code that > solved the > problem for me (my OS is Linux). > > By the way, maybe somebody knows why almost all classes / methods in > Lucene > are final? I would surely prefer to inherit from FSDirectory instead > of > writing a wrapper around it. > > Cheers, > Stas. > > ----- Original Message ----- > From: "Terry Steichen" <[EMAIL PROTECTED]> > To: "Lucene Users List" <[EMAIL PROTECTED]> > Sent: Friday, October 11, 2002 8:42 PM > Subject: Re: FileNotFoundException while indexing > > > > Stas, > > > > Would you be able/willing to share that improved Directory with the > list? > > > > Regards, > > > > Terry > > > > > ATTACHMENT part 2 application/octet-stream name=FSLockService.java > ATTACHMENT part 3 application/octet-stream name=LockingFSDirectory.java > ATTACHMENT part 4 application/octet-stream name=FSLockService_NativeLockService.h > ATTACHMENT part 5 application/octet-stream name=LockService.c > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
