public class IgfsMetaManager extends IgfsManager
igfsCtx
Constructor and Description |
---|
IgfsMetaManager(boolean relaxed,
boolean client)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
IgfsCreateResult |
appendDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
int bufSize,
boolean create)
Append to a file 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.
|
IgfsEntryInfo |
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.
|
List<IgniteUuid> |
idsForPath(IgfsPath path)
Get IDs for the given path.
|
IgfsEntryInfo |
info(IgniteUuid fileId)
Gets file info by its ID.
|
IgfsEntryInfo |
infoForPath(IgfsPath path)
Get info for the given path.
|
Map<IgniteUuid,IgfsEntryInfo> |
infos(Collection<IgniteUuid> fileIds)
Gets files details by their IDs.
|
IgfsEntryInfo |
lock(IgniteUuid fileId,
boolean del)
Lock the file explicitly outside of transaction.
|
boolean |
mkdirsDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
Map<String,String> props)
Create directory in DUAL mode.
|
void |
move(IgfsPath srcPath,
IgfsPath dstPath)
Move routine.
|
protected void |
onKernalStart0() |
protected void |
onKernalStop0(boolean cancel) |
IgfsSecondaryInputStreamDescriptor |
openDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
int bufSize)
Open file in DUAL mode.
|
IgfsPathIds |
pathIds(IgfsPath path)
Gets all file IDs for components of specified path.
|
boolean |
renameDual(IgfsSecondaryFileSystem fs,
IgfsPath src,
IgfsPath dest)
Rename path in DUAL mode.
|
IgfsEntryInfo |
reserveSpace(IgniteUuid fileId,
long space,
IgfsFileAffinityRange affRange)
Reserve space for file.
|
Boolean |
sampling()
Get sampling flag state.
|
boolean |
sampling(Boolean val)
Set sampling flag.
|
protected void |
start0()
Start manager implementation.
|
IgfsEntryInfo |
synchronizeFileDual(IgfsSecondaryFileSystem fs,
IgfsPath path)
Synchronizes with secondary file system.
|
void |
unlock(IgniteUuid fileId,
IgniteUuid lockId,
long modificationTime)
Remove explicit lock on file held by the current stream.
|
void |
unlock(IgniteUuid fileId,
IgniteUuid lockId,
long modificationTime,
boolean updateSpace,
long space,
IgfsFileAffinityRange affRange)
Remove explicit lock on file held by the current stream.
|
IgfsEntryInfo |
updateDual(IgfsSecondaryFileSystem fs,
IgfsPath path,
Map<String,String> props)
Update path in DUAL mode.
|
IgfsEntryInfo |
updateInfo(IgniteUuid fileId,
javax.cache.processor.EntryProcessor<IgniteUuid,IgfsEntryInfo,IgfsEntryInfo> proc)
Update file info in cache.
|
IgfsEntryInfo |
updateProperties(IgniteUuid fileId,
Map<String,String> props)
Update file info (file properties) in cache.
|
void |
updateTimes(IgfsPath path,
long modificationTime,
long accessTime,
IgfsSecondaryFileSystem secondaryFs)
Update times.
|
kernalStartInfo, kernalStopInfo, onKernalStart, onKernalStop, start, startInfo, stop, stop0, stopInfo
public IgfsMetaManager(boolean relaxed, boolean client)
relaxed
- Relaxed mode flag.client
- Client flag.protected void start0() throws IgniteCheckedException
start0
in class IgfsManager
IgniteCheckedException
protected void onKernalStart0() throws IgniteCheckedException
onKernalStart0
in class IgfsManager
IgniteCheckedException
- 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 IgfsPathIds pathIds(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 IgfsEntryInfo info(@Nullable IgniteUuid fileId) throws IgniteCheckedException
fileId
- File ID to get details for.IgniteCheckedException
- If failed.public Map<IgniteUuid,IgfsEntryInfo> infos(Collection<IgniteUuid> fileIds) throws IgniteCheckedException
fileIds
- file IDs to get details for.IgniteCheckedException
- If failed.@Nullable public IgfsEntryInfo lock(IgniteUuid fileId, boolean del) throws IgniteCheckedException
fileId
- File ID to lock.del
- If file is being locked for delete.null
if file cannot be locked or doesn't exist.IgniteCheckedException
- If the file with such id does not exist, or on another failure.public void unlock(IgniteUuid fileId, IgniteUuid lockId, long modificationTime) throws IgniteCheckedException
fileId
- File ID.lockId
- Lock ID.modificationTime
- Modification time to write to file info.IgniteCheckedException
- If failed.public void unlock(IgniteUuid fileId, IgniteUuid lockId, long modificationTime, boolean updateSpace, long space, @Nullable IgfsFileAffinityRange affRange) throws IgniteCheckedException
fileId
- File ID.lockId
- Lock ID.modificationTime
- Modification time to write to file info.updateSpace
- Whether to update space.space
- Space.affRange
- Affinity range.IgniteCheckedException
- If failed.public Map<String,IgfsListingEntry> directoryListing(IgniteUuid fileId) throws IgniteCheckedException
fileId
- File to list child files for.IgniteCheckedException
- If failed.public IgfsEntryInfo fileForFragmentizer(Collection<IgniteUuid> exclude) throws IgniteCheckedException
exclude
- File IDs to exclude from result.IgniteCheckedException
- If failed to get file for fragmentizer.public void move(IgfsPath srcPath, IgfsPath dstPath) throws IgniteCheckedException
srcPath
- Source path.dstPath
- Destination path.IgniteCheckedException
- In case of exception.@Nullable public IgfsEntryInfo updateProperties(IgniteUuid fileId, Map<String,String> props) throws IgniteCheckedException
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 IgfsEntryInfo reserveSpace(IgniteUuid fileId, long space, IgfsFileAffinityRange affRange) throws IgniteCheckedException
fileId
- File ID.space
- Space.affRange
- Affinity range.IgniteCheckedException
@Nullable public IgfsEntryInfo updateInfo(IgniteUuid fileId, javax.cache.processor.EntryProcessor<IgniteUuid,IgfsEntryInfo,IgfsEntryInfo> proc) throws IgniteCheckedException
fileId
- File ID to update information for.proc
- Entry processor to invoke.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 IgfsCreateResult appendDual(IgfsSecondaryFileSystem fs, IgfsPath path, int bufSize, boolean create) throws IgniteCheckedException
fs
- File system.path
- Path.bufSize
- Buffer size.create
- Create flag.IgniteCheckedException
- If output stream open for append has failed.@Nullable public IgfsEntryInfo infoForPath(IgfsPath path) throws IgniteCheckedException
path
- Path.IgniteCheckedException
- If failed.public List<IgniteUuid> idsForPath(IgfsPath path) throws IgniteCheckedException
path
- Path.IgniteCheckedException
- If 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 IgfsEntryInfo 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 IgfsEntryInfo 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(IgfsPath path, long modificationTime, long accessTime, IgfsSecondaryFileSystem secondaryFs) throws IgniteCheckedException
path
- Path.accessTime
- Access time.modificationTime
- Modification time.secondaryFs
- Secondary file system.IgniteCheckedException
- If failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017