Class LockingRevFile
java.lang.Object
com.zfabrik.components.provider.util.LockingRevFile
- All Implemented Interfaces:
Lock
A file system lock with properties. This is used by component repository implementations to manage concurrency
in update decisions of locally managed resources.
The typical usage of this class is
LockingRevFile lrf = new LockingRevFile(f); lrf.open(); try { // do some checking based on lrf.properties() // do whatever updates needed // update lrf.properties() as required // persist updates lrf.update(); } finally { lrf.close(); }
- Author:
- hb
-
Constructor Details
-
LockingRevFile
-
-
Method Details
-
exists
public boolean exists() -
open
- Specified by:
open
in interfaceLock
- Throws:
IOException
-
properties
- Specified by:
properties
in interfaceLock
-
update
- Specified by:
update
in interfaceLock
- Throws:
IOException
-
close
- Specified by:
close
in interfaceLock
- Throws:
IOException
-