@NotThreadSafe public final class MutableInodeFile extends MutableInode<MutableInodeFile> implements InodeFileView
mAcl, mCreationTimeMs, mDirectory, mId, mTtl, mTtlActionasDirectory, 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, updateMaskclone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckPermission, compareTo, getACL, getCreationTimeMs, getGroup, getId, getLastAccessTimeMs, getLastModificationTimeMs, getMediumTypes, getMode, getName, getOwner, getParentId, getPermission, getPersistenceState, getTtl, getTtlAction, getUfsFingerprint, getXAttr, isDeleted, isDirectory, isFile, isPersisted, isPinnedprotected MutableInodeFile getThis()
getThis in class MutableInode<MutableInodeFile>this so that the abstract class can use the fluent builder patternpublic FileInfo generateClientFileInfo(java.lang.String path)
InodeViewFileInfo of the file or folder.generateClientFileInfo in interface InodeViewgenerateClientFileInfo in class MutableInode<MutableInodeFile>path - the path of the fileFileInfopublic void reset()
public DefaultAccessControlList getDefaultACL() throws java.lang.UnsupportedOperationException
getDefaultACL in interface InodeViewjava.lang.UnsupportedOperationException - if the inode is a filepublic MutableInodeFile setDefaultACL(DefaultAccessControlList acl) throws java.lang.UnsupportedOperationException
setDefaultACL in class MutableInode<MutableInodeFile>acl - set the default ACL associated with this inodejava.lang.UnsupportedOperationException - if the inode is a filepublic java.util.List<java.lang.Long> getBlockIds()
getBlockIds in interface InodeFileViewpublic long getBlockSizeBytes()
getBlockSizeBytes in interface InodeFileViewpublic long getLength()
getLength in interface InodeFileViewpublic long getBlockContainerId()
getBlockContainerId in interface InodeFileViewpublic long getBlockIdByIndex(int blockIndex)
throws BlockInfoException
InodeFileViewgetBlockIdByIndex in interface InodeFileViewblockIndex - the index to get the block id forBlockInfoException - if the index of the block is out of rangepublic long getPersistJobId()
getPersistJobId in interface InodeFileViewpublic long getShouldPersistTime()
getShouldPersistTime in interface InodeFileViewpublic int getReplicationDurable()
getReplicationDurable in interface InodeFileViewpublic int getReplicationMax()
getReplicationMax in interface InodeFileViewpublic int getReplicationMin()
getReplicationMin in interface InodeFileViewpublic java.lang.String getTempUfsPath()
getTempUfsPath in interface InodeFileViewpublic boolean isCacheable()
isCacheable in interface InodeFileViewpublic boolean isCompleted()
isCompleted in interface InodeFileViewpublic long getNewBlockId()
public MutableInodeFile setBlockSizeBytes(long blockSizeBytes)
blockSizeBytes - the block size to usepublic MutableInodeFile setBlockIds(java.util.List<java.lang.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(java.lang.String tempUfsPath)
tempUfsPath - the temporary UFS path this file is persisted topublic void updateFromEntry(File.UpdateInodeFileEntry entry)
entry - the entrypublic java.lang.String toString()
toString in class java.lang.Objectpublic static MutableInodeFile fromJournalEntry(File.InodeFileEntry entry)
MutableInodeFile.entry - the entry to convertMutableInodeFile representationpublic static MutableInodeFile create(long blockContainerId, long parentId, java.lang.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 JournalEntryRepresentablepublic Journal.JournalEntry toJournalEntry(java.lang.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 © 2020. All Rights Reserved.