Package com.zfabrik.components.provider.util

## Class LockingRevFile

- java.lang.Object
- - com.zfabrik.components.provider.util.LockingRevFile

- All Implemented Interfaces:
    `Lock`

      public class LockingRevFile
      extends java.lang.Object
      implements 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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `LockingRevFile​(java.io.File file)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` |
    `boolean` | `exists()` |
    `void` | `open()` |
    `java.util.Properties` | `properties()` |
    `void` | `update()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LockingRevFile

          public LockingRevFile​(java.io.File file)

  - ### Method Detail

    - #### exists

          public boolean exists()

    - #### open

          public void open()
                    throws java.io.IOException

      Specified by:
        `open` in interface `Lock`
      Throws:
        `java.io.IOException`

    - #### properties

          public java.util.Properties properties()

      Specified by:
        `properties` in interface `Lock`

    - #### update

          public void update()
                      throws java.io.IOException

      Specified by:
        `update` in interface `Lock`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Specified by:
        `close` in interface `Lock`
      Throws:
        `java.io.IOException`