Class FileSystemSynchronizer


  • public class FileSystemSynchronizer
    extends java.lang.Object
    This class is essentially a global flag used to track the long running file system synchronizing operation. This class is a workaround to avoid rewriting the complicated file system locking.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isSynchronizing()
      Returns true the underlying file system is going through a long-running synchronization operation while holding the filesystem lock.
      static void setSynchronizing​(boolean b)
      Sets whether the synchronizing operation is running.
      • Methods inherited from class java.lang.Object

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

      • FileSystemSynchronizer

        public FileSystemSynchronizer()
    • Method Detail

      • setSynchronizing

        public static void setSynchronizing​(boolean b)
        Sets whether the synchronizing operation is running.
        Parameters:
        b - true if synchronizing
      • isSynchronizing

        public static boolean isSynchronizing()
        Returns true the underlying file system is going through a long-running synchronization operation while holding the filesystem lock. Calling this method allows clients in the Swing thread to avoid calling methods that require a file system lock, which would cause the UI to lock during the synchronizing operation.
        Returns:
        true if synchronizing