/** {@inheritDoc} */ @Override public void localLoadCache(@Nullable IgniteBiPredicate<K, V> p, @Nullable Object... args) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.localLoadCacheAsync(p, args)); else delegate.localLoadCache(p, args); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean containsKeys(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); if (isAsync()) { setFuture(delegate.containsKeysAsync(keys)); return false; } else return delegate.containsKeys(keys); }
/** {@inheritDoc} */ @Override public boolean containsKey(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); if (isAsync()) { setFuture(delegate.containsKeyAsync(key)); return false; } else return delegate.containsKey(key); }
/** {@inheritDoc} */ @Override public void put(K key, V val) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(putAsync0(key, val)); else delegate.put(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void putAll(Map<? extends K, ? extends V> map) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.putAllAsync(map)); else delegate.putAll(map); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.removeAllAsync()); else delegate.removeAll(); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.removeAllAsync(keys)); else delegate.removeAll(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void clear() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.clearAsync()); else delegate.clear(); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void clearAll(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.clearAllAsync(keys)); else delegate.clearAll(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void clear(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.clearAsync(key)); else delegate.clear(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public V get(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAsync(key)); return null; } else return delegate.get(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public CacheEntry<K, V> getEntry(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getEntryAsync(key)); return null; } else return delegate.getEntry(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@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 remove(K key, V oldVal) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.removeAsync(key, oldVal)); return false; } else return delegate.remove(key, oldVal); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public V getAndRemove(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAndRemoveAsync(key)); return null; } else return delegate.getAndRemove(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public Map<K, V> getAllOutTx(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAllOutTxAsync(keys)); return null; } else return delegate.getAllOutTx(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public V getAndPut(K key, V val) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAndPutAsync(key, val)); return null; } else return delegate.getAndPut(key, val); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public boolean remove(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.removeAsync(key)); return false; } else return delegate.remove(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public Map<K, V> getAll(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAllAsync(keys)); return null; } else return delegate.getAll(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@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); } }