Lock
public class LockingRevFile extends java.lang.Object implements Lock
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(); }
Constructor | Description |
---|---|
LockingRevFile(java.io.File file) |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
boolean |
exists() |
|
void |
open() |
|
java.util.Properties |
properties() |
|
void |
update() |
public boolean exists()
public void open() throws java.io.IOException
public java.util.Properties properties()
properties
in interface Lock
public void update() throws java.io.IOException