@NotThreadSafe public final class MutableInodeFile extends MutableInode<MutableInodeFile> implements InodeFileView
mAcl, mCreationTimeMs, mDirectory, mId, mTtl, mTtlAction
asDirectory, asFile, checkPermission, equals, getACL, getCreationTimeMs, getGroup, getId, getLastAccessTimeMs, getLastModificationTimeMs, getMediumTypes, getMode, getName, getOwner, getParentId, getPermission, getPersistenceState, getTtl, getTtlAction, getUfsFingerprint, getXAttr, hashCode, isDeleted, isDirectory, isFile, isPersisted, isPinned, removeAcl, removeExtendedAcl, replaceAcl, setAcl, setCreationTimeMs, setDeleted, setGroup, setInternalAcl, setLastAccessTimeMs, setLastAccessTimeMs, setLastModificationTimeMs, setLastModificationTimeMs, setMediumTypes, setMode, setName, setOwner, setParentId, setPersistenceState, setPinned, setTtl, setTtlAction, setUfsFingerprint, setXAttr, toProtoBuilder, toStringHelper, updateFromEntry, updateMask
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
checkPermission, compareTo, getACL, getCreationTimeMs, getGroup, getId, getLastAccessTimeMs, getLastModificationTimeMs, getMediumTypes, getMode, getName, getOwner, getParentId, getPermission, getPersistenceState, getTtl, getTtlAction, getUfsFingerprint, getXAttr, isDeleted, isDirectory, isFile, isPersisted, isPinned
protected MutableInodeFile getThis()
getThis
in class MutableInode<MutableInodeFile>
this
so that the abstract class can use the fluent builder patternpublic FileInfo generateClientFileInfo(String path)
InodeView
FileInfo
of the file or folder.generateClientFileInfo
in interface InodeView
generateClientFileInfo
in class MutableInode<MutableInodeFile>
path
- the path of the fileFileInfo
public void reset()
public DefaultAccessControlList getDefaultACL() throws UnsupportedOperationException
getDefaultACL
in interface InodeView
UnsupportedOperationException
- if the inode is a filepublic MutableInodeFile setDefaultACL(DefaultAccessControlList acl) throws UnsupportedOperationException
setDefaultACL
in class MutableInode<MutableInodeFile>
acl
- set the default ACL associated with this inodeUnsupportedOperationException
- if the inode is a filepublic List<Long> getBlockIds()
getBlockIds
in interface InodeFileView
public long getBlockSizeBytes()
getBlockSizeBytes
in interface InodeFileView
public long getLength()
getLength
in interface InodeFileView
public long getBlockContainerId()
getBlockContainerId
in interface InodeFileView
public long getBlockIdByIndex(int blockIndex) throws BlockInfoException
InodeFileView
getBlockIdByIndex
in interface InodeFileView
blockIndex
- the index to get the block id forBlockInfoException
- if the index of the block is out of rangepublic long getPersistJobId()
getPersistJobId
in interface InodeFileView
public long getShouldPersistTime()
getShouldPersistTime
in interface InodeFileView
public int getReplicationDurable()
getReplicationDurable
in interface InodeFileView
public int getReplicationMax()
getReplicationMax
in interface InodeFileView
public int getReplicationMin()
getReplicationMin
in interface InodeFileView
public String getTempUfsPath()
getTempUfsPath
in interface InodeFileView
public boolean isCacheable()
isCacheable
in interface InodeFileView
public boolean isCompleted()
isCompleted
in interface InodeFileView
public long getNewBlockId()
public MutableInodeFile setBlockSizeBytes(long blockSizeBytes)
blockSizeBytes
- the block size to usepublic MutableInodeFile setBlockIds(List<Long> blockIds)
blockIds
- the id's of the blockpublic MutableInodeFile setCacheable(boolean cacheable)
cacheable
- the cacheable flag value to usepublic MutableInodeFile setCompleted(boolean completed)
completed
- the complete flag value to usepublic MutableInodeFile setLength(long length)
length
- the length to usepublic MutableInodeFile setPersistJobId(long persistJobId)
persistJobId
- the id of the job persisting this filepublic MutableInodeFile setShouldPersistTime(long shouldPersistTime)
shouldPersistTime
- the time that this file should start persistingpublic MutableInodeFile setReplicationDurable(int replicationDurable)
replicationDurable
- the durable number of block replicationpublic MutableInodeFile setReplicationMax(int replicationMax)
replicationMax
- the maximum number of block replicationpublic MutableInodeFile setReplicationMin(int replicationMin)
replicationMin
- the minimum number of block replicationpublic MutableInodeFile setTempUfsPath(String tempUfsPath)
tempUfsPath
- the temporary UFS path this file is persisted topublic void updateFromEntry(File.UpdateInodeFileEntry entry)
entry
- the entrypublic static MutableInodeFile fromJournalEntry(File.InodeFileEntry entry)
MutableInodeFile
.entry
- the entry to convertMutableInodeFile
representationpublic static MutableInodeFile create(long blockContainerId, long parentId, String name, long creationTimeMs, CreateFileContext context)
MutableInodeFile
.blockContainerId
- block container id of this inodeparentId
- id of the parent of this inodename
- name of this inodecreationTimeMs
- the creation time for this inodecontext
- context to create this fileMutableInodeFile
representationpublic Journal.JournalEntry toJournalEntry()
toJournalEntry
in interface JournalEntryRepresentable
Journal.JournalEntry
representing this objectpublic Journal.JournalEntry toJournalEntry(String path)
toJournalEntry
in class MutableInode<MutableInodeFile>
path
- path of the inodepublic InodeMeta.Inode toProto()
public static MutableInodeFile fromProto(InodeMeta.InodeOrBuilder inode)
inode
- a protocol buffer inodeMutableInodeFile
for the inodeCopyright © 2023. All Rights Reserved.