public abstract class Inode extends java.lang.Object implements InodeView
| Modifier | Constructor and Description |
|---|---|
protected |
Inode(InodeView delegate) |
| Modifier and Type | Method and Description |
|---|---|
InodeDirectory |
asDirectory()
Casts the inode as an
InodeDirectory if it is one, otherwise throws an
exception. |
InodeFile |
asFile() |
boolean |
checkPermission(java.lang.String user,
java.util.List<java.lang.String> groups,
AclAction action)
Checks whether the user or one of the groups has the permission to take the action.
|
boolean |
equals(java.lang.Object other) |
FileInfo |
generateClientFileInfo(java.lang.String path)
Generates a
FileInfo of the file or folder. |
AccessControlList |
getACL() |
long |
getCreationTimeMs() |
DefaultAccessControlList |
getDefaultACL() |
java.lang.String |
getGroup() |
long |
getId() |
long |
getLastAccessTimeMs() |
long |
getLastModificationTimeMs() |
java.util.Set<java.lang.String> |
getMediumTypes() |
short |
getMode() |
java.lang.String |
getName() |
java.lang.String |
getOwner() |
long |
getParentId() |
AclActions |
getPermission(java.lang.String user,
java.util.List<java.lang.String> groups)
Gets the permitted actions for a user.
|
PersistenceState |
getPersistenceState() |
long |
getTtl() |
TtlAction |
getTtlAction() |
java.lang.String |
getUfsFingerprint() |
java.util.Map<java.lang.String,byte[]> |
getXAttr() |
int |
hashCode() |
boolean |
isDeleted() |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isPersisted() |
boolean |
isPinned() |
Journal.JournalEntry |
toJournalEntry() |
InodeMeta.Inode |
toProto() |
static Inode |
wrap(InodeView delegate)
Wraps an InodeView, providing read-only access.
|
protected Inode(InodeView delegate)
public long getCreationTimeMs()
getCreationTimeMs in interface InodeViewpublic java.lang.String getGroup()
public long getTtl()
public TtlAction getTtlAction()
getTtlAction in interface InodeViewTtlActionpublic long getLastModificationTimeMs()
getLastModificationTimeMs in interface InodeViewpublic long getLastAccessTimeMs()
getLastAccessTimeMs in interface InodeViewpublic java.lang.String getName()
public short getMode()
public PersistenceState getPersistenceState()
getPersistenceState in interface InodeViewPersistenceState of the inodepublic long getParentId()
getParentId in interface InodeViewpublic java.lang.String getOwner()
@Nullable public java.util.Map<java.lang.String,byte[]> getXAttr()
public boolean isDeleted()
public boolean isDirectory()
isDirectory in interface InodeViewpublic boolean isFile()
public boolean isPinned()
public boolean isPersisted()
isPersisted in interface InodeViewpublic java.lang.String getUfsFingerprint()
getUfsFingerprint in interface InodeViewpublic AccessControlList getACL()
public DefaultAccessControlList getDefaultACL() throws java.lang.UnsupportedOperationException
getDefaultACL in interface InodeViewjava.lang.UnsupportedOperationException - if the inode is a filepublic java.util.Set<java.lang.String> getMediumTypes()
getMediumTypes in interface InodeViewpublic FileInfo generateClientFileInfo(java.lang.String path)
InodeViewFileInfo of the file or folder.generateClientFileInfo in interface InodeViewpath - the path of the fileFileInfopublic boolean checkPermission(java.lang.String user,
java.util.List<java.lang.String> groups,
AclAction action)
InodeViewcheckPermission in interface InodeViewuser - the user checking permissiongroups - the groups the user belongs toaction - the action to takeAccessControlList.checkPermission(String, List, AclAction)public AclActions getPermission(java.lang.String user, java.util.List<java.lang.String> groups)
InodeViewgetPermission in interface InodeViewuser - the usergroups - the groups the user belongs toAccessControlList.getPermission(String, List)public InodeMeta.Inode toProto()
public Journal.JournalEntry toJournalEntry()
toJournalEntry in interface JournalEntryRepresentablepublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.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 © 2020. All Rights Reserved.