You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Bernd Eckenfels <ec...@zusammenkunft.net> on 2013/09/07 02:09:02 UTC

[VFS] Atomic Renames

Hello,

while implementing my Database Blob VFS2 Provider I noticed, that with the  
current AbstractFileObject a moveTo() which is delegated to deRename()  
cannot be implemented in a atomic way. The renameTo method will call  
destFile.delete() and then doRename().

In my JDBC Provider I want to ensure the rename is atomic, this means that  
the DELETE and UPDATE JDBC Commands should be in the same commit(). I  
could do that with some magic by keeping state between delete and  
doRename, but I think it would be easier to simply have the method decide  
about the delete itself.

Have you thought about this? I could overwrite the renameTo method, but it  
is quite verbose, so the risk is, that I will miss changes if I do so. It  
would be better to have a doRename(replace=true) variant?

Greetings
Bernd
-- 
http://wiki.piratenpartei.de/Benutzer:Eckes

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org