/** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(Object key, Object val) { return delegate.get().putIfAbsentAsync(keyTransformer.transform(key), val); }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(K key, V val) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.putIfAbsentAsync(key, val); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteFuture<Boolean> putIfAbsentAsync(K key, V val) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); return createFuture(delegate.putIfAbsentAsync(key, val)); }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { return exp == null && val == null ? c.removeAsync(key) : exp == null ? c.putIfAbsentAsync(key, val) : val == null ? c.removeAsync(key, exp) : c.replaceAsync(key, exp, val); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { if (ttl != null && ttl > 0) { Duration duration = new Duration(MILLISECONDS, ttl); c = c.withExpiryPolicy(new ModifiedExpiryPolicy(duration)); } return c.putIfAbsentAsync(key, val); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { if (ttl != null && ttl > 0) { Duration duration = new Duration(MILLISECONDS, ttl); c = c.withExpiryPolicy(new ModifiedExpiryPolicy(duration)); } return c.putIfAbsentAsync(key, val); } }
/** {@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 IgniteFuture<Boolean> putIfAbsentAsync(K key, V val) { return createFuture(delegate.putIfAbsentAsync(key, val)); }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<Boolean> putIfAbsentAsync(K key, V val) { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.putIfAbsentAsync(key, val); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { if (ttl != null && ttl > 0) { Duration duration = new Duration(MILLISECONDS, ttl); c = c.withExpiryPolicy(new ModifiedExpiryPolicy(duration)); } return c.putIfAbsentAsync(key, val); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { return exp == null && val == null ? c.removeAsync(key) : exp == null ? c.putIfAbsentAsync(key, val) : val == null ? c.removeAsync(key, exp) : c.replaceAsync(key, exp, val); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> applyx(IgniteInternalCache<Object, Object> c, GridKernalContext ctx) { if (ttl != null && ttl > 0) { Duration duration = new Duration(MILLISECONDS, ttl); c = c.withExpiryPolicy(new ModifiedExpiryPolicy(duration)); } return c.putIfAbsentAsync(key, val); } }
/** {@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); } }