@PublicApi @NotThreadSafe public final class SetAttributeOptions extends Object
public static SetAttributeOptions defaults()
SetAttributeOptions
public CommonOptions getCommonOptions()
public Boolean getPinned()
public Long getTtl()
@Deprecated public Boolean getPersisted()
public String getOwner()
public String getGroup()
public Mode getMode()
public boolean isRecursive()
public SetAttributeOptions setCommonOptions(CommonOptions options)
options
- the common optionspublic SetAttributeOptions setPinned(boolean pinned)
pinned
- the pinned flag value to use; it specifies whether the object should be kept in
memory, if ttl(time to live) is set, the file will be deleted after expiration no
matter this value is true or falsepublic SetAttributeOptions setTtl(long ttl)
ttl
- the TTL (time to live) value to use; it identifies duration (in milliseconds) the
created file should be kept around before it is automatically deleted, irrespective of
whether the file is pinnedpublic SetAttributeOptions setTtlAction(TtlAction ttlAction)
ttlAction
- the TtlAction
to use@Deprecated public SetAttributeOptions setPersisted(boolean persisted)
persisted
- the persisted flag value to use; it specifies whether the file has been
persisted in the under file system or not.public SetAttributeOptions setOwner(String owner) throws IllegalArgumentException
owner
- to be set as the owner of a pathIllegalArgumentException
- if the owner is set to emptypublic SetAttributeOptions setGroup(String group) throws IllegalArgumentException
group
- to be set as the group of a pathIllegalArgumentException
- if the group is set to emptypublic SetAttributeOptions setMode(Mode mode)
mode
- to be set as the mode of a pathpublic SetAttributeOptions setRecursive(boolean recursive)
recursive
- whether to set acl recursively under a directorypublic SetAttributeTOptions toThrift()
Copyright © 2023. All Rights Reserved.