/** {@inheritDoc} */ @Override protected void operation(int key) throws Exception { cache.replace(key, key, key); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.replaceAsync(key, oldVal, newVal)); return false; } else return delegate.replace(key, oldVal, newVal); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V val) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.replaceAsync(key, val)); return false; } else return delegate.replace(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean replace(Object key, Object oldVal, Object newVal) throws IgniteCheckedException { return delegate.get().replace(keyTransformer.transform(key), oldVal, newVal); }
/** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) { try { if (isAsync()) { setFuture(delegate.replaceAsync(key, oldVal, newVal)); return false; } else return delegate.replace(key, oldVal, newVal); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean replace(Object key, Object val) throws IgniteCheckedException { return delegate.get().replace(keyTransformer.transform(key), val); }
/** {@inheritDoc} */ @Override public boolean replace(K key, V val) { try { if (isAsync()) { setFuture(delegate.replaceAsync(key, val)); return false; } else return delegate.replace(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V val) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.replace(key, val); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.replace(key, oldVal, newVal); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override protected void operation(int key) throws Exception { cache.replace(key, key, key); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V oldVal, V newVal) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.replace(key, oldVal, newVal); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public boolean replace(K key, V val) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.replace(key, val); } finally { gate.leave(prev); } }