krishnact / gaevfs

Automatically exported from code.google.com/p/gaevfs
Apache License 2.0
0 stars 1 forks source link

enable cross jvm file locks via datastore as said was missing #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
enable cross jvm file locks via datastore as said was missing

i.e. a cross jvm file lock can be created via datastore. could be as simple as 
having a locked 
property on the entity. acquiring the lock would change locked property from 
false to true
in a transaction and would require an initial query similar to get file where 
key = ? and locked = 
false then set locked you true. this is similar to how object versioning is 
working and is atomic. 
should get a concurrent exception if multi attempts to lock same file at same 
time. with that said 
may make sense to maintain a version in the file which is always incremented on 
write

Original issue reported on code.google.com by jwein...@gmail.com on 15 Mar 2010 at 7:50