Class FileSystemUtil


  • public class FileSystemUtil
    extends java.lang.Object
    Utility class that provides methods for use internally in the lumis.portal.filesystem package.
    Since:
    4.1.0
    Version:
    $Revision: 22700 $ $Date: 2019-05-02 16:44:42 -0300 (Thu, 02 May 2019) $
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSystemUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean deleteLocalFile​(java.io.File file)
      Deletes a file locally.
      static boolean isStandardFileSystem()
      Returns whether the used file system is a LumisPortal standard one.
      static void sendClusterCommand​(java.lang.Runnable runnable)
      Utility method that sends the given runnable as a durable, total order cluster command.
      static <T extends java.io.Serializable>
      T
      sendClusterCommand​(IClusterCallable<T> callable)
      Utility method that sends the given callable as a durable, total order cluster command.
      • Methods inherited from class java.lang.Object

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

      • FileSystemUtil

        public FileSystemUtil()
    • Method Detail

      • deleteLocalFile

        public static boolean deleteLocalFile​(java.io.File file)
        Deletes a file locally.
        Parameters:
        file - the file.
        Returns:
        true if the file was successfully deleted, false otherwise.
        Since:
        4.1.0
      • sendClusterCommand

        public static void sendClusterCommand​(java.lang.Runnable runnable)
        Utility method that sends the given runnable as a durable, total order cluster command.
        Parameters:
        runnable - the runnable.
        Since:
        4.1.0
      • sendClusterCommand

        public static <T extends java.io.Serializable> T sendClusterCommand​(IClusterCallable<T> callable)
                                                                     throws java.lang.Exception
        Utility method that sends the given callable as a durable, total order cluster command.
        Parameters:
        callable - the callable.
        Returns:
        the local execution result (if any).
        Throws:
        java.lang.Exception
        Since:
        8.0.0
      • isStandardFileSystem

        public static boolean isStandardFileSystem()
        Returns whether the used file system is a LumisPortal standard one.
        Returns:
        whether the used file system is a LumisPortal standard one.
        Since:
        8.0.0