@ThreadSafe public interface InodeStore extends ReadOnlyInodeStore, Checkpointed, java.io.Closeable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
InodeStore.Factory
Factory for creating inode stores.
|
static interface |
InodeStore.WriteBatch
Used to perform batched writes.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
addChild(long parentId,
InodeView child)
Makes an inode the child of the specified parent.
|
void |
addChild(long parentId,
java.lang.String childName,
java.lang.Long childId)
Makes an inode the child of the specified parent.
|
void |
clear()
Removes all inodes and edges.
|
default void |
close() |
default InodeStore.WriteBatch |
createWriteBatch()
Creates a write batch.
|
default java.util.Optional<Inode> |
get(long id,
ReadOption option) |
default java.util.Optional<MutableInode<?>> |
getMutable(long id) |
java.util.Optional<MutableInode<?>> |
getMutable(long id,
ReadOption option)
Gets a mutable representation of the specified inode.
|
default void |
remove(InodeView inode)
Removes an inode from the inode store.
|
void |
remove(java.lang.Long inodeId)
Removes an inode from the inode store.
|
void |
removeChild(long parentId,
java.lang.String name)
Removes a child from a parent inode.
|
default void |
removeInodeAndParentEdge(InodeView inode)
Removes an inode and the edge leading to it from the inode store.
|
default boolean |
supportsBatchWrite() |
void |
writeInode(MutableInode<?> inode)
Adds the given inode, or overwrites it if it already exists.
|
default void |
writeNewInode(MutableInode<?> inode)
Adds a new inode.
|
allEdges, allInodes, get, getChild, getChild, getChild, getChild, getChildId, getChildId, getChildId, getChildId, getChildIds, getChildIds, getChildIds, getChildIds, getChildren, getChildren, getChildren, getChildren, hasChildren, hasChildrengetCheckpointName, restoreFromCheckpoint, writeToCheckpointjava.util.Optional<MutableInode<?>> getMutable(long id, ReadOption option)
id - an inode idoption - read optionsdefault java.util.Optional<MutableInode<?>> getMutable(long id)
id - an inode idgetMutable(long, ReadOption) with default optiondefault java.util.Optional<Inode> get(long id, ReadOption option)
get in interface ReadOnlyInodeStoreid - an inode idoption - the optionsvoid remove(java.lang.Long inodeId)
inodeId - an inode to removedefault void remove(InodeView inode)
inode - an inode to removedefault void removeInodeAndParentEdge(InodeView inode)
inode - an inode to removevoid writeInode(MutableInode<?> inode)
writeNewInode(MutableInode).
This method requires an inode lock manager read or write lock on the written inode.inode - the inode to writedefault void writeNewInode(MutableInode<?> inode)
writeInode(MutableInode), but with an added information that
the inode is new. This allows some inode stores to perform extra optimizations.
This method requires an inode lock manager read or write lock on the written inode.inode - the inode to writedefault InodeStore.WriteBatch createWriteBatch()
supportsBatchWrite().InodeStore.WriteBatch which can be used to perform a batched writedefault boolean supportsBatchWrite()
void clear()
void addChild(long parentId,
java.lang.String childName,
java.lang.Long childId)
parentId - the parent idchildName - the child namechildId - the child inode iddefault void addChild(long parentId,
InodeView child)
parentId - the parent idchild - the child inodevoid removeChild(long parentId,
java.lang.String name)
parentId - the parent inode idname - the child namedefault void close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableCopyright © 2020. All Rights Reserved.