Package alluxio.underfs.options
Class CreateOptions
- java.lang.Object
-
- alluxio.underfs.options.CreateOptions
-
@PublicApi @NotThreadSafe public final class CreateOptions extends java.lang.Object
Method options for creating a file in UnderFileSystem.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreateOptions
defaults(AlluxioConfiguration conf)
boolean
equals(java.lang.Object o)
AccessControlList
getAcl()
boolean
getCreateParent()
java.lang.String
getGroup()
Mode
getMode()
java.lang.String
getOwner()
int
hashCode()
boolean
isEnsureAtomic()
CreateOptions
setAcl(AccessControlList acl)
Sets an initial acl for the newly created file.CreateOptions
setCreateParent(boolean createParent)
Sets option to force creation of parent directories.CreateOptions
setEnsureAtomic(boolean atomic)
Set atomicity guarantees.CreateOptions
setGroup(java.lang.String group)
CreateOptions
setMode(Mode mode)
CreateOptions
setOwner(java.lang.String owner)
java.lang.String
toString()
-
-
-
Method Detail
-
defaults
public static CreateOptions defaults(AlluxioConfiguration conf)
- Parameters:
conf
- Alluxio configuration- Returns:
- the default
CreateOptions
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-