Package alluxio.util

Class ModeUtils


  • @ThreadSafe
    public final class ModeUtils
    extends java.lang.Object
    Utility methods for mode.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Mode applyDirectoryUMask​(Mode mode, java.lang.String authUmask)
      Applies the default umask for newly created directories to this mode.
      static Mode applyFileUMask​(Mode mode, java.lang.String authUmask)
      Applies the default umask for newly created files to this mode.
      static Mode getUMask​(java.lang.String confUmask)
      Gets the file / directory creation umask.
      static short protoToShort​(alluxio.grpc.PMode pMode)
      Used to get short value of a proto PMode.
      • Methods inherited from class java.lang.Object

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

      • applyFileUMask

        public static Mode applyFileUMask​(Mode mode,
                                          java.lang.String authUmask)
        Applies the default umask for newly created files to this mode.
        Parameters:
        mode - the mode to update
        authUmask - the umask to apply on the file
        Returns:
        the updated object
      • applyDirectoryUMask

        public static Mode applyDirectoryUMask​(Mode mode,
                                               java.lang.String authUmask)
        Applies the default umask for newly created directories to this mode.
        Parameters:
        mode - the mode to update
        authUmask - the umask to apply on the directory
        Returns:
        the updated object
      • protoToShort

        public static short protoToShort​(alluxio.grpc.PMode pMode)
        Used to get short value of a proto PMode.
        Parameters:
        pMode - proto mode
        Returns:
        short value
      • getUMask

        public static Mode getUMask​(@Nullable
                                    java.lang.String confUmask)
        Gets the file / directory creation umask.
        Parameters:
        confUmask - the string representation of umask
        Returns:
        the umask Mode