public class IgfsMetaManager extends IgfsManager
igfsCtx| Constructor and Description |
|---|
IgfsMetaManager() |
| Modifier and Type | Method and Description |
|---|---|
IgfsSecondaryOutputStreamDescriptor |
appendDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
int bufSize)
Append to a file in DUAL mode.
|
IgfsSecondaryOutputStreamDescriptor |
createDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
boolean simpleCreate,
Map<String,String> props,
boolean overwrite,
int bufSize,
short replication,
long blockSize,
IgniteUuid affKey)
Create the file in DUAL mode.
|
boolean |
deleteDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
boolean recursive)
Delete path in DUAL mode.
|
Map<String,IgfsListingEntry> |
directoryListing(IgniteUuid fileId)
List child files for specified file ID.
|
boolean |
exists(IgniteUuid fileId)
Ensure that entry with the given ID exists in meta cache.
|
IgfsFileInfo |
fileForFragmentizer(Collection<IgniteUuid> exclude)
Gets first available file info for fragmentizer.
|
IgniteUuid |
fileId(IgfsPath path)
Gets file ID for specified path.
|
IgniteUuid |
fileId(IgniteUuid parentId,
String fileName)
Gets file ID by its name from parent directory listing.
|
List<IgniteUuid> |
fileIds(IgfsPath path)
Gets all file IDs for components of specified path.
|
IgfsFileInfo |
info(IgniteUuid fileId)
Gets file info by its ID.
|
Map<IgniteUuid,IgfsFileInfo> |
infos(Collection<IgniteUuid> fileIds)
Gets files details by their IDs.
|
IgfsFileInfo |
lock(IgniteUuid fileId)
Lock the file explicitly outside of transaction.
|
IgfsFileInfo |
lockInfo(IgfsFileInfo info)
Set lock on file info.
|
boolean |
mkdirsDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
Map<String,String> props)
Create directory in DUAL mode.
|
void |
move(IgniteUuid fileId,
String srcFileName,
IgniteUuid srcParentId,
String destFileName,
IgniteUuid destParentId)
Move or rename file.
|
protected void |
onKernalStart0() |
protected void |
onKernalStop0(boolean cancel) |
IgfsSecondaryInputStreamDescriptor |
openDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
int bufSize)
Open file in DUAL mode.
|
Collection<IgniteUuid> |
pendingDeletes()
Check whether there are any pending deletes and return collection of pending delete entry IDs.
|
IgniteUuid |
putIfAbsent(IgniteUuid parentId,
String fileName,
IgfsFileInfo newFileInfo)
Add file into file system structure.
|
IgfsFileInfo |
removeIfEmpty(IgniteUuid parentId,
String fileName,
IgniteUuid fileId,
IgfsPath path,
boolean rmvLocked)
Remove file from the file system structure.
|
boolean |
renameDual(IgfsSecondaryFileSystem fs,
IgfsPath src,
IgfsPath dest)
Rename path in DUAL mode.
|
Boolean |
sampling()
Get sampling flag state.
|
boolean |
sampling(Boolean val)
Set sampling flag.
|
protected void |
start0()
Start manager implementation.
|
IgfsFileInfo |
synchronizeFileDual(IgfsSecondaryFileSystem fs,
IgfsPath path)
Synchronizes with secondary file system.
|
void |
unlock(IgfsFileInfo info,
long modificationTime)
Remove explicit lock on file held by the current thread.
|
IgfsFileInfo |
updateDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
Map<String,String> props)
Update path in DUAL mode.
|
IgfsFileInfo |
updateInfo(IgniteUuid fileId,
IgniteClosure<IgfsFileInfo,IgfsFileInfo> c)
Update file info in cache.
|
void |
updateParentListingAsync(IgniteUuid parentId,
IgniteUuid fileId,
String fileName,
long lenDelta,
long modificationTime)
Asynchronously updates record in parent listing.
|
IgfsFileInfo |
updateProperties(IgniteUuid parentId,
IgniteUuid fileId,
String fileName,
Map<String,String> props)
Update file info (file properties) in cache.
|
void |
updateTimes(IgniteUuid parentId,
IgniteUuid fileId,
String fileName,
long accessTime,
long modificationTime)
Updates last access and last modification times.
|
kernalStartInfo, kernalStopInfo, onKernalStart, onKernalStop, start, startInfo, stop, stop0, stopInfoprotected void start0()
throws IgniteCheckedException
start0 in class IgfsManagerIgniteCheckedExceptionprotected void onKernalStart0()
throws IgniteCheckedException
onKernalStart0 in class IgfsManagerIgniteCheckedException - If failed.protected void onKernalStop0(boolean cancel)
onKernalStop0 in class IgfsManager@Nullable public IgniteUuid fileId(IgfsPath path) throws IgniteCheckedException
path - Path.null if such file doesn't exist.IgniteCheckedException - If failed.@Nullable public IgniteUuid fileId(IgniteUuid parentId, String fileName) throws IgniteCheckedException
parentId - Parent directory ID to get child ID for.fileName - File name in parent listing to get file ID for.IgniteCheckedException - If failed.public List<IgniteUuid> fileIds(IgfsPath path) throws IgniteCheckedException
null if such files don't exist.path - Path.IgniteCheckedException - If failed.public boolean exists(IgniteUuid fileId) throws IgniteCheckedException
fileId - File id.True in case such entry exists.IgniteCheckedException - IF failed.@Nullable public IgfsFileInfo info(@Nullable IgniteUuid fileId) throws IgniteCheckedException
fileId - File ID to get details for.IgniteCheckedException - If failed.public Map<IgniteUuid,IgfsFileInfo> infos(Collection<IgniteUuid> fileIds) throws IgniteCheckedException
fileIds - file IDs to get details for.IgniteCheckedException - If failed.public IgfsFileInfo lock(IgniteUuid fileId) throws IgniteCheckedException
fileId - File ID to lock.null if file cannot be locked or doesn't exist.IgniteCheckedException - If failed.public IgfsFileInfo lockInfo(IgfsFileInfo info) throws IgniteCheckedException
info - File info.IgniteCheckedException - In case lock is already set on that file.public void unlock(IgfsFileInfo info, long modificationTime) throws IgniteCheckedException
info - File info to unlock.modificationTime - Modification time to write to file info.IgniteCheckedException - If failed.public Map<String,IgfsListingEntry> directoryListing(IgniteUuid fileId) throws IgniteCheckedException
fileId - File to list child files for.IgniteCheckedException - If failed.public IgfsFileInfo fileForFragmentizer(Collection<IgniteUuid> exclude) throws IgniteCheckedException
exclude - File IDs to exclude from result.IgniteCheckedException - If failed to get file for fragmentizer.public IgniteUuid putIfAbsent(IgniteUuid parentId, String fileName, IgfsFileInfo newFileInfo) throws IgniteCheckedException
parentId - Parent file ID.fileName - File name in the parent's listing.newFileInfo - File info to store in the parent's listing.null if passed file info was stored.IgniteCheckedException - If failed.public void move(IgniteUuid fileId, String srcFileName, IgniteUuid srcParentId, String destFileName, IgniteUuid destParentId) throws IgniteCheckedException
fileId - File ID to move or rename.srcFileName - Original file name in the parent's listing.srcParentId - Parent directory ID.destFileName - New file name in the parent's listing after moving.destParentId - New parent directory ID.IgniteCheckedException - If failed.@Nullable public IgfsFileInfo removeIfEmpty(IgniteUuid parentId, String fileName, IgniteUuid fileId, IgfsPath path, boolean rmvLocked) throws IgniteCheckedException
parentId - Parent file ID.fileName - New file name in the parent's listing.fileId - File ID to remove.path - Path of the deleted file.rmvLocked - Whether to remove this entry in case it is has explicit lock.null if such file no more exist.IgniteCheckedException - If failed.public Collection<IgniteUuid> pendingDeletes() throws IgniteCheckedException
IgniteCheckedException - If operation failed.@Nullable public IgfsFileInfo updateProperties(@Nullable IgniteUuid parentId, IgniteUuid fileId, String fileName, Map<String,String> props) throws IgniteCheckedException
parentId - Parent ID (null if file is root).fileName - To update listing.fileId - File ID to update information for.props - Properties to set for the file.null if such file ID not found.IgniteCheckedException - If operation failed.public void updateParentListingAsync(IgniteUuid parentId, IgniteUuid fileId, String fileName, long lenDelta, long modificationTime)
parentId - Parent ID.fileId - File ID.fileName - File name.lenDelta - Length delta.modificationTime - Last modification time.@Nullable public IgfsFileInfo updateInfo(IgniteUuid fileId, IgniteClosure<IgfsFileInfo,IgfsFileInfo> c) throws IgniteCheckedException
fileId - File ID to update information for.c - Closure to update file's info inside transaction.null if such file ID not found.IgniteCheckedException - If failed.public boolean sampling(Boolean val) throws IgniteCheckedException
val - Sampling flag state or null to clear sampling state and mark it as "not set".True if sampling mode was actually changed by this call.IgniteCheckedException - If failed.public Boolean sampling() throws IgniteCheckedException
True in case sampling is enabled, false otherwise or null in case sampling
is not set.IgniteCheckedException - If failed.public IgfsSecondaryOutputStreamDescriptor createDual(IgfsSecondaryFileSystem fs, IgfsPath path, boolean simpleCreate, @Nullable Map<String,String> props, boolean overwrite, int bufSize, short replication, long blockSize, IgniteUuid affKey) throws IgniteCheckedException
fs - File system.path - Path.simpleCreate - "Simple create" flag.props - Properties..overwrite - Overwrite flag.bufSize - Buffer size.replication - Replication factor.blockSize - Block size.affKey - Affinity key.IgniteCheckedException - If file creation failed.public IgfsSecondaryOutputStreamDescriptor appendDual(IgfsSecondaryFileSystem fs, IgfsPath path, int bufSize) throws IgniteCheckedException
fs - File system.path - Path.bufSize - Buffer size.IgniteCheckedException - If output stream open for append has failed.public IgfsSecondaryInputStreamDescriptor openDual(IgfsSecondaryFileSystem fs, IgfsPath path, int bufSize) throws IgniteCheckedException
fs - Secondary file system.path - Path to open.bufSize - Buffer size.IgniteCheckedException - If input stream open has failed.@Nullable public IgfsFileInfo synchronizeFileDual(IgfsSecondaryFileSystem fs, IgfsPath path) throws IgniteCheckedException
fs - File system.path - Path.null if file not found.IgniteCheckedException - If sync task failed.public boolean mkdirsDual(IgfsSecondaryFileSystem fs, IgfsPath path, Map<String,String> props) throws IgniteCheckedException
fs - Secondary file system.path - Path to create.props - Properties to be applied.True in case rename was successful.IgniteCheckedException - If directory creation failed.public boolean renameDual(IgfsSecondaryFileSystem fs, IgfsPath src, IgfsPath dest) throws IgniteCheckedException
fs - Secondary file system.src - Source path.dest - Destination path.IgniteCheckedException - If failed.public boolean deleteDual(IgfsSecondaryFileSystem fs, IgfsPath path, boolean recursive) throws IgniteCheckedException
fs - Secondary file system.path - Path to update.recursive - Recursive flag.IgniteCheckedException - If delete failed.public IgfsFileInfo updateDual(IgfsSecondaryFileSystem fs, IgfsPath path, Map<String,String> props) throws IgniteCheckedException
fs - Secondary file system.path - Path to update.props - Properties to be applied.IgniteCheckedException - If update failed.public void updateTimes(IgniteUuid parentId, IgniteUuid fileId, String fileName, long accessTime, long modificationTime) throws IgniteCheckedException
parentId - File parent ID.fileId - File ID to update.fileName - File name to update. Must match file ID.accessTime - Access time to set. If -1, will not be updated.modificationTime - Modification time to set. If -1, will not be updated.IgniteCheckedException - If update failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.2.0-incubating Release Date : June 16 2015