try (GridNearTxLocal tx = startTx()) {
/** * Update file info (file properties) in cache. * * @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 public IgfsEntryInfo updateProperties(IgniteUuid fileId, Map<String, String> props) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { IgfsEntryInfo info = updatePropertiesNonTx(fileId, props); tx.commit(); return info; } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to update properties because Grid is stopping [fileId=" + fileId + ", props=" + props + ']'); }
validTxState(false); try (GridNearTxLocal tx = startTx()) { Collection<IgniteUuid> res = new HashSet<>();
validTxState(false); try (GridNearTxLocal tx = startTx()) { Map<IgniteUuid, IgfsEntryInfo> infos = lockIds(parentId, id);
try (GridNearTxLocal tx = startTx()) {
/** * Set sampling flag. * * @param val Sampling flag state or {@code null} to clear sampling state and mark it as "not set". * @return {@code True} if sampling mode was actually changed by this call. * @throws IgniteCheckedException If failed. */ public boolean sampling(Boolean val) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { Object prev = val != null ? metaCache.getAndPut(sampling, val) : metaCache.getAndRemove(sampling); tx.commit(); return !F.eq(prev, val); } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set sampling flag because Grid is stopping."); }
try (GridNearTxLocal tx = startTx()) {
log.debug("Reserve file space: " + fileId); try (GridNearTxLocal tx = startTx()) {
try (GridNearTxLocal tx = startTx()) { final Map<IgniteUuid, IgfsEntryInfo> lockInfos = lockIds(lockIds);
try (GridNearTxLocal tx = startTx()) {
try (GridNearTxLocal tx = startTx()) { Map<IgniteUuid, IgfsEntryInfo> lockInfos = lockIds(lockIds);
try (GridNearTxLocal tx = startTx()) { Map<IgniteUuid, IgfsEntryInfo> lockInfos = lockIds(lockIds);
log.debug("Update file info [fileId=" + fileId + ", proc=" + proc + ']'); try (GridNearTxLocal tx = startTx()) {
dstPathIds.addExistingIds(lockIds, relaxed); try (GridNearTxLocal tx = startTx()) {
try (GridNearTxLocal tx = startTx()) { Map<IgniteUuid, IgfsEntryInfo> lockInfos = lockIds(lockIds);
/** * Update file info (file properties) in cache. * * @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 public IgfsEntryInfo updateProperties(IgniteUuid fileId, Map<String, String> props) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { IgfsEntryInfo info = updatePropertiesNonTx(fileId, props); tx.commit(); return info; } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to update properties because Grid is stopping [fileId=" + fileId + ", props=" + props + ']'); }
/** * Set sampling flag. * * @param val Sampling flag state or {@code null} to clear sampling state and mark it as "not set". * @return {@code True} if sampling mode was actually changed by this call. * @throws IgniteCheckedException If failed. */ public boolean sampling(Boolean val) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { Object prev = val != null ? metaCache.getAndPut(sampling, val) : metaCache.getAndRemove(sampling); tx.commit(); return !F.eq(prev, val); } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set sampling flag because Grid is stopping."); }
try (GridNearTxLocal tx = startTx()) {
validTxState(false); try (GridNearTxLocal tx = startTx()) { Map<IgniteUuid, IgfsEntryInfo> infos = lockIds(parentId, id);
log.debug("Reserve file space: " + fileId); try (GridNearTxLocal tx = startTx()) {