[concurrency-interest] A new Lock implementation: FileLock
gregg at cytetech.com
Sat Aug 27 21:14:20 EDT 2005
Joshua Bloch wrote:
> Hi. I wrote a new java.util.concurrent.locks.Lock implementation
> called FileLock. Briefly, a FileLock instance is backed by a
> java.nio.channels.FileLock as well as a
> java.util.concurrent.locks.ReentrantLock. It implements functionality
> similarlar to ReentrantLock, but without the bells and whistles, and
> it works across VMs as well as within a VM.
> But there are problems:
> (4) People would use FileLocks across physical machines, using NFS
> files. This might work reliably. Or it might not. If it didn't,
> they'd get angry at me.
> Anyway, if you are so inclined, take a look at it and tell me what you
> think. When I first came up with the idea, I thought it might make a
> nice addition to j.u.c, but now I'm not so sure.
For remote, distributed capabilities, the Jini platform's transaction manager
really provides a crash resilent implementation. The configurabilty and
flexibility at deployment provides a great way to make things as effecient or as
secure as you need.
I know Jini is not in the J2SE, but at some point, I hope people who need
distributed solutions will come to realize what power and capabilities
are in Jini.
There's really not an interesting reason to recreate all of that work.
More information about the Concurrency-interest