Class CreateOptions


  • @PublicApi
    @NotThreadSafe
    public final class CreateOptions
    extends java.lang.Object
    Method options for creating a file in UnderFileSystem.
    • Method Detail

      • getAcl

        public AccessControlList getAcl()
        Returns:
        the Acl or a null value indicating default values for ACL in creating the file
      • getCreateParent

        public boolean getCreateParent()
        Returns:
        whether to create any necessary but nonexistent parent directories
      • getOwner

        public java.lang.String getOwner()
        Returns:
        the owner
      • getGroup

        public java.lang.String getGroup()
        Returns:
        the group
      • getMode

        public Mode getMode()
        Returns:
        the mode
      • isEnsureAtomic

        public boolean isEnsureAtomic()
        Returns:
        true, if writes are guaranteed to be atomic
      • setAcl

        public CreateOptions setAcl​(AccessControlList acl)
        Sets an initial acl for the newly created file.
        Parameters:
        acl - option to set the ACL after creation
        Returns:
        the updated object
      • setCreateParent

        public CreateOptions setCreateParent​(boolean createParent)
        Sets option to force creation of parent directories. If true, any necessary but nonexistent parent directories are created. If false, the behavior is implementation dependent.
        Parameters:
        createParent - option to force parent directory creation
        Returns:
        the updated object
      • setEnsureAtomic

        public CreateOptions setEnsureAtomic​(boolean atomic)
        Set atomicity guarantees. When true, writes to the created stream must become readable all at once or not at all. The destination path is created only after closing the given stream. When, false the stream may or may not be atomic.
        Parameters:
        atomic - whether to ensure created stream is atomic
        Returns:
        the updated object
      • setOwner

        public CreateOptions setOwner​(java.lang.String owner)
        Parameters:
        owner - the owner to set
        Returns:
        the updated object
      • setGroup

        public CreateOptions setGroup​(java.lang.String group)
        Parameters:
        group - the group to set
        Returns:
        the updated object
      • setMode

        public CreateOptions setMode​(Mode mode)
        Parameters:
        mode - the mode to set
        Returns:
        the updated object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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