public abstract class Inode extends Object implements InodeView
Modifier | Constructor and Description |
---|---|
protected |
Inode(InodeView delegate) |
protected Inode(InodeView delegate)
public long getCreationTimeMs()
getCreationTimeMs
in interface InodeView
public String getGroup()
public long getTtl()
public TtlAction getTtlAction()
getTtlAction
in interface InodeView
TtlAction
public long getLastModificationTimeMs()
getLastModificationTimeMs
in interface InodeView
public long getLastAccessTimeMs()
getLastAccessTimeMs
in interface InodeView
public String getName()
public short getMode()
public PersistenceState getPersistenceState()
getPersistenceState
in interface InodeView
PersistenceState
of the inodepublic long getParentId()
getParentId
in interface InodeView
public String getOwner()
public boolean isDeleted()
public boolean isDirectory()
isDirectory
in interface InodeView
public boolean isFile()
public boolean isPinned()
public boolean isPersisted()
isPersisted
in interface InodeView
public String getUfsFingerprint()
getUfsFingerprint
in interface InodeView
public AccessControlList getACL()
public DefaultAccessControlList getDefaultACL() throws UnsupportedOperationException
getDefaultACL
in interface InodeView
UnsupportedOperationException
- if the inode is a filepublic com.google.common.collect.ImmutableSet<String> getMediumTypes()
getMediumTypes
in interface InodeView
public FileInfo generateClientFileInfo(String path)
InodeView
FileInfo
of the file or folder.generateClientFileInfo
in interface InodeView
path
- the path of the fileFileInfo
public boolean checkPermission(String user, List<String> groups, AclAction action)
InodeView
checkPermission
in interface InodeView
user
- the user checking permissiongroups
- the groups the user belongs toaction
- the action to takeAccessControlList.checkPermission(String, List, AclAction)
public AclActions getPermission(String user, List<String> groups)
InodeView
getPermission
in interface InodeView
user
- the usergroups
- the groups the user belongs toAccessControlList.getPermission(String, List)
public InodeMeta.Inode toProto()
public Journal.JournalEntry toJournalEntry()
toJournalEntry
in interface JournalEntryRepresentable
Journal.JournalEntry
representing this objectpublic InodeDirectory asDirectory()
InodeDirectory
if it is one, otherwise throws an
exception.
This gives convenience in method chaining, e.g.
inode.asDirectory().getChildren()
instead of
((InodeDirectory) inode).getChildren()public InodeFile asFile()
Copyright © 2023. All Rights Reserved.