@Override public Boolean call() throws Exception { return cache.putIfAbsent(key, true); } });
/** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.putIfAbsentAsync(key, val)); return false; } else return delegate.putIfAbsent(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) { try { if (isAsync()) { setFuture(delegate.putIfAbsentAsync(key, val)); return false; } else return delegate.putIfAbsent(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean putIfAbsent(Object key, Object val) throws IgniteCheckedException { return delegate.get().putIfAbsent(keyTransformer.transform(key), val); }
/** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.putIfAbsent(key, val); } finally { gate.leave(prev); } }
/** * Put new entry to meta cache immediately linking it to parent. * * @param info Info to put. * @param parentId Parent ID. * @param name Name in parent. * @throws IgniteCheckedException If failed. */ private void createNewEntry(IgfsEntryInfo info, IgniteUuid parentId, String name) throws IgniteCheckedException { validTxState(true); if (!id2InfoPrj.putIfAbsent(info.id(), info)) throw fsException("Failed to create new metadata entry due to ID conflict: " + info.id()); if (parentId != null) id2InfoPrj.invoke(parentId, new IgfsMetaDirectoryListingAddProcessor(name, new IgfsListingEntry(info))); }
@Override public Boolean call() throws Exception { return cache.putIfAbsent(key, true); } });
/** {@inheritDoc} */ @Override public boolean putIfAbsent(K key, V val) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.putIfAbsent(key, val); } finally { gate.leave(prev); } }
/** * Put new entry to meta cache immediately linking it to parent. * * @param info Info to put. * @param parentId Parent ID. * @param name Name in parent. * @throws IgniteCheckedException If failed. */ private void createNewEntry(IgfsEntryInfo info, IgniteUuid parentId, String name) throws IgniteCheckedException { validTxState(true); if (!id2InfoPrj.putIfAbsent(info.id(), info)) throw fsException("Failed to create new metadata entry due to ID conflict: " + info.id()); if (parentId != null) id2InfoPrj.invoke(parentId, new IgfsMetaDirectoryListingAddProcessor(name, new IgfsListingEntry(info))); }