Class ExecFileLock

  • All Implemented Interfaces:
    Locker

    public class ExecFileLock
    extends Object
    implements Locker
    This class define a lock file.
    Since:
    1.1
    Author:
    Laurent Jourdren
    • Constructor Detail

      • ExecFileLock

        public ExecFileLock​(File lockFile)
        Public constructor.
        Parameters:
        lockFile - lock file to use
    • Method Detail

      • lock

        public void lock()
                  throws IOException
        Description copied from interface: Locker
        Wait the token and then lock the resource.
        Specified by:
        lock in interface Locker
        Throws:
        IOException - if an error occurs while locking the resource
      • unlock

        public void unlock()
                    throws IOException
        Description copied from interface: Locker
        Unlock the resource.
        Specified by:
        unlock in interface Locker
        Throws:
        IOException - if an error occurs while unlocking the resource