/** * Invoke lock processor. * * @param id File ID. * @param del Whether lock is taken for delete. * @return Resulting file info. * @throws IgniteCheckedException If failed. */ private IgfsEntryInfo invokeLock(IgniteUuid id, boolean del) throws IgniteCheckedException { return invokeAndGet(id, new IgfsMetaFileLockProcessor(createFileLockId(del))); }
/** * Update file info (file properties) in cache in existing transaction. * * @param fileId File ID to update information for. * @param props Properties to set for the file. * @return Updated file info or {@code null} if such file ID not found. * @throws IgniteCheckedException If operation failed. */ @Nullable private IgfsEntryInfo updatePropertiesNonTx(final IgniteUuid fileId, Map<String, String> props) throws IgniteCheckedException { assert fileId != null; assert !F.isEmpty(props) : "Expects not-empty file's properties"; validTxState(true); if (log.isDebugEnabled()) log.debug("Update file properties [fileId=" + fileId + ", props=" + props + ']'); try { final IgfsEntryInfo oldInfo = info(fileId); if (oldInfo == null) return null; return invokeAndGet(fileId, new IgfsMetaUpdatePropertiesProcessor(props)); } catch (GridClosureException e) { throw U.cast(e); } }
invokeAndGet(fileId, new IgfsMetaFileReserveSpaceProcessor(space, affRange));
return null; // File not found. IgfsEntryInfo newInfo = invokeAndGet(fileId, proc);
newBlockSize = blockSize; IgfsEntryInfo newInfo = invokeAndGet(overwriteId, new IgfsMetaFileCreateProcessor(newAccessTime, newModificationTime, newProps, newBlockSize, affKey, newLockId, evictExclude, newLen));
/** * Invoke lock processor. * * @param id File ID. * @param del Whether lock is taken for delete. * @return Resulting file info. * @throws IgniteCheckedException If failed. */ private IgfsEntryInfo invokeLock(IgniteUuid id, boolean del) throws IgniteCheckedException { return invokeAndGet(id, new IgfsMetaFileLockProcessor(createFileLockId(del))); }
/** * Update file info (file properties) in cache in existing transaction. * * @param fileId File ID to update information for. * @param props Properties to set for the file. * @return Updated file info or {@code null} if such file ID not found. * @throws IgniteCheckedException If operation failed. */ @Nullable private IgfsEntryInfo updatePropertiesNonTx(final IgniteUuid fileId, Map<String, String> props) throws IgniteCheckedException { assert fileId != null; assert !F.isEmpty(props) : "Expects not-empty file's properties"; validTxState(true); if (log.isDebugEnabled()) log.debug("Update file properties [fileId=" + fileId + ", props=" + props + ']'); try { final IgfsEntryInfo oldInfo = info(fileId); if (oldInfo == null) return null; return invokeAndGet(fileId, new IgfsMetaUpdatePropertiesProcessor(props)); } catch (GridClosureException e) { throw U.cast(e); } }
invokeAndGet(fileId, new IgfsMetaFileReserveSpaceProcessor(space, affRange));
return null; // File not found. IgfsEntryInfo newInfo = invokeAndGet(fileId, proc);
newBlockSize = blockSize; IgfsEntryInfo newInfo = invokeAndGet(overwriteId, new IgfsMetaFileCreateProcessor(newAccessTime, newModificationTime, newProps, newBlockSize, affKey, newLockId, evictExclude, newLen));