Package io.hawt.util

Class FileLocker


  • public class FileLocker
    extends java.lang.Object
    A simple API to a file lock
    • Constructor Summary

      Constructors 
      Constructor Description
      FileLocker​(java.io.File lockFile)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      static FileLocker getLock​(java.io.File lockFile)
      Attempts to grab the lock for the given file, returning a FileLock if the lock has been created; otherwise it returns null
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FileLocker

        public FileLocker​(java.io.File lockFile)
    • Method Detail

      • getLock

        public static FileLocker getLock​(java.io.File lockFile)
        Attempts to grab the lock for the given file, returning a FileLock if the lock has been created; otherwise it returns null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • destroy

        public void destroy()