org.apache.ignite.internal.processors.cache

## Class IgniteCacheProxyImpl<K,V>

- java.lang.Object
- - org.apache.ignite.internal.AsyncSupportAdapter<IgniteCache<K,V>>
  - - org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl<K,V>

All Implemented Interfaces:
  Closeable, Externalizable, Serializable, AutoCloseable, Iterable<javax.cache.Cache.Entry<K,V>>, javax.cache.Cache<K,V>, IgniteCache<K,V>, IgniteCacheProxy<K,V>, IgniteAsyncSupport

    public class IgniteCacheProxyImpl<K,V>
    extends AsyncSupportAdapter<IgniteCache<K,V>>
    implements IgniteCacheProxy<K,V>

Cache proxy implementation.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface javax.cache.Cache

`javax.cache.Cache.Entry<K,V>`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.AsyncSupportAdapter

`curFut`

### Constructor Summary

Constructors
Constructor and Description
`IgniteCacheProxyImpl()` Empty constructor required for `Externalizable`.
`IgniteCacheProxyImpl(@NotNull GridCacheContext<K,V> ctx, @NotNull IgniteInternalCache<K,V> delegate, boolean async)`

### Method Summary

All Methods Instance Methods Concrete Methods
`IgniteCacheProxy<K,V>` `cacheNoGate()` Gets cache proxy which does not acquire read lock on gateway enter, should be used only if grid read lock is externally acquired.
`void` `checkRestart()` Throws `IgniteCacheRestartingException` if proxy is restarting.
`void` `checkRestart(boolean noWait)` Throws `IgniteCacheRestartingException` if proxy is restarting.
`void` `clear()`
`void` `clear(K key)` Clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`void` `clearAll(Set<? extends K> keys)` Clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`IgniteFuture<Void>` `clearAllAsync(Set<? extends K> keys)` Asynchronously clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`IgniteFuture<Void>` `clearAsync()` Asynchronously clears the contents of the cache, without notifying listeners or `CacheWriter`s.
`IgniteFuture<Void>` `clearAsync(K key)` Asynchronously clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`void` `clearStatistics()` Clear cluster statistics for this cache.
`void` `close()` Closes this cache instance.
`IgniteFuture<?>` `closeAsync()`
`void` `closeProxy()` Closes this proxy instance.
`boolean` `containsKey(K key)`
`IgniteFuture<Boolean>` `containsKeyAsync(K key)` Asynchronously determines if the `Cache` contains an entry for the specified key.
`boolean` `containsKeys(Set<? extends K> keys)` Determines if the `Cache` contains entries for the specified keys.
`IgniteFuture<Boolean>` `containsKeysAsync(Set<? extends K> keys)` Asynchronously determines if the `Cache` contains entries for the specified keys.
`GridCacheContext<K,V>` `context()`
`GridCacheContext<K,V>` `context0()`
`protected IgniteCache<K,V>` `createAsyncInstance()` Creates component with asynchronous mode enabled.
`protected <R> IgniteFuture<R>` `createFuture(IgniteInternalFuture<R> fut)`
`void` `deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> lsnrCfg)`
`void` `destroy()` Completely deletes the cache with all its data from the system on all cluster nodes.
`IgniteFuture<?>` `destroyAsync()`
`void` `enableStatistics(boolean enabled)` Sets statistics enabled flag cluster wide for this cache.
`IgniteCacheProxy<K,V>` `gatewayWrapper()`
`V` `get(K key)`
`Map<K,V>` `getAll(Collection<? extends K> keys)`
`Map<K,V>` `getAll(Set<? extends K> keys)`
`IgniteFuture<Map<K,V>>` `getAllAsync(Set<? extends K> keys)` Asynchronously gets a collection of entries from the `Cache`, returning them as `Map` of the values associated with the set of keys requested.
`Map<K,V>` `getAllOutTx(Set<? extends K> keys)` Gets values from cache.
`IgniteFuture<Map<K,V>>` `getAllOutTxAsync(Set<? extends K> keys)` Asynchronously gets values from cache.
`V` `getAndPut(K key, V val)`
`IgniteFuture<V>` `getAndPutAsync(K key, V val)` Asynchronously associates the specified value with the specified key in this cache, returning an existing value if one existed as the future result.
`V` `getAndPutIfAbsent(K key, V val)` Stores given key-value pair in cache only if cache had no previous mapping for it.
`IgniteFuture<V>` `getAndPutIfAbsentAsync(K key, V val)` Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it.
`V` `getAndRemove(K key)`
`IgniteFuture<V>` `getAndRemoveAsync(K key)` Asynchronously removes the entry for a key only if currently mapped to some value.
`V` `getAndReplace(K key, V val)`
`IgniteFuture<V>` `getAndReplaceAsync(K key, V val)` Asynchronously replaces the value for a given key if and only if there is a value currently mapped by the key.
`IgniteFuture<V>` `getAsync(K key)` Asynchronously gets an entry from the cache.
`CacheManager` `getCacheManager()`
`<C extends javax.cache.configuration.Configuration<K,V>> C` `getConfiguration(Class<C> clazz)`
`Collection<CacheEntry<K,V>>` `getEntries(Set<? extends K> keys)` Gets a collection of entries from the `Cache`.
`IgniteFuture<Collection<CacheEntry<K,V>>>` `getEntriesAsync(Set<? extends K> keys)` Asynchronously gets a collection of entries from the `Cache`.
`CacheEntry<K,V>` `getEntry(K key)` Gets an entry from the cache.
`IgniteFuture<CacheEntry<K,V>>` `getEntryAsync(K key)` Asynchronously gets an entry from the cache.
`CountDownLatch` `getInitLatch()`
`String` `getName()`
`IgniteFuture<?>` `indexReadyFuture()` Returns future that will be completed when all indexes for this cache are ready to use.
`GridCacheProxyImpl<K,V>` `internalProxy()`
`<T> T` `invoke(@Nullable AffinityTopologyVersion topVer, K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)`
`<T> T` `invoke(K key, CacheEntryProcessor<K,V,T> entryProcessor, Object... args)` Invokes an `CacheEntryProcessor` against the `Cache.Entry` specified by the provided key.
`<T> T` `invoke(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)` Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.
`<T> Map<K,javax.cache.processor.EntryProcessorResult<T>>` `invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args)` Asynchronously invokes each `EntryProcessor` from map's values against the correspondent `Cache.Entry` specified by map's key set.
`<T> Map<K,javax.cache.processor.EntryProcessorResult<T>>` `invokeAll(Set<? extends K> keys, CacheEntryProcessor<K,V,T> entryProcessor, Object... args)` Invokes an `CacheEntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.
`<T> Map<K,javax.cache.processor.EntryProcessorResult<T>>` `invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)` Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.
`<T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>>` `invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map, Object... args)` Asynchronously version of the `IgniteCache.invokeAll(Map, Object...)` method.
`<T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>>` `invokeAllAsync(Set<? extends K> keys, CacheEntryProcessor<K,V,T> entryProcessor, Object... args)` Asynchronously invokes an `CacheEntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.
`<T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>>` `invokeAllAsync(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)` Asynchronously invokes an `EntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.
`<T> IgniteFuture<T>` `invokeAsync(K key, CacheEntryProcessor<K,V,T> entryProcessor, Object... args)` Asynchronously invokes an `CacheEntryProcessor` against the `Cache.Entry` specified by the provided key.
`<T> IgniteFuture<T>` `invokeAsync(K key, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... args)` Asynchronously invokes an `EntryProcessor` against the `Cache.Entry` specified by the provided key.
`boolean` `isClosed()`
`boolean` `isLocalLocked(K key, boolean byCurrThread)` Checks if specified key is locked.
`boolean` `isProxyClosed()`
`boolean` `isRestarting()`
`Iterator<javax.cache.Cache.Entry<K,V>>` `iterator()`
`<K1,V1> IgniteCache<K1,V1>` `keepBinary()` Creates projection that will operate with binary objects.
`void` `loadAll(Set<? extends K> keys, boolean replaceExisting, @Nullable javax.cache.integration.CompletionListener completionLsnr)`
`void` `loadCache(@Nullable IgniteBiPredicate<K,V> p, Object... args)` Executes `IgniteCache.localLoadCache(IgniteBiPredicate, Object...)` on all cache nodes.
`IgniteFuture<Void>` `loadCacheAsync(@Nullable IgniteBiPredicate<K,V> p, Object... args)` Asynchronously executes `IgniteCache.localLoadCache(IgniteBiPredicate, Object...)` on all cache nodes.
`void` `localClear(K key)` Clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`void` `localClearAll(Set<? extends K> keys)` Clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s.
`Iterable<javax.cache.Cache.Entry<K,V>>` `localEntries(CachePeekMode... peekModes)` Allows for iteration over local cache entries.
`void` `localEvict(Collection<? extends K> keys)` Attempts to evict all entries associated with keys.
`void` `localLoadCache(@Nullable IgniteBiPredicate<K,V> p, Object... args)` Delegates to `CacheStore.loadCache(IgniteBiInClosure,Object...)` method to load state from the underlying persistent storage.
`IgniteFuture<Void>` `localLoadCacheAsync(@Nullable IgniteBiPredicate<K,V> p, Object... args)` Asynchronously loads state from the underlying persistent storage by delegating to `CacheStore.loadCache(IgniteBiInClosure,Object...)` method.
`CacheMetrics` `localMetrics()` Gets local snapshot metrics (statistics) for this cache.
`CacheMetricsMXBean` `localMxBean()` Gets local MxBean for this cache.
`V` `localPeek(K key, CachePeekMode... peekModes)` Peeks at a value in the local storage using an optional peek mode.
`boolean` `localPreloadPartition(int part)` Efficiently preloads cache partition into page memory if it exists on the local node.
`int` `localSize(CachePeekMode... peekModes)` Gets the number of all entries cached on this node.
`long` `localSizeLong(CachePeekMode... peekModes)` Gets the number of all entries cached on this node as a long value.
`long` `localSizeLong(int part, CachePeekMode... peekModes)` Gets the number of all entries cached on this node for the partition as a long value.
`Lock` `lock(K key)` Creates a `Lock` instance associated with passed key.
`Lock` `lockAll(Collection<? extends K> keys)` Creates a `Lock` instance associated with passed keys.
`Collection<Integer>` `lostPartitions()` Gets a collection of lost partition IDs.
`CacheMetrics` `metrics()` Gets whole cluster snapshot metrics (statistics) for this cache.
`CacheMetrics` `metrics(ClusterGroup grp)` Gets cluster group snapshot metrics for caches in cluster group.
`CacheMetricsMXBean` `mxBean()` Gets whole cluster MxBean for this cache.
`void` `onRestarted(GridCacheContext ctx, IgniteInternalCache delegate)` Mark this proxy as restarted.
`void` `opportunisticRestart(IgniteInternalCache<K,V> cache)` If proxy is already being restarted, returns future to wait on, else restarts this cache proxy.
`void` `preloadPartition(int part)` Efficiently preloads cache primary partition into page memory.
`IgniteFuture<Void>` `preloadPartitionAsync(int part)` Efficiently preloads cache partition into page memory.
`void` `put(K key, V val)`
`void` `putAll(Map<? extends K,? extends V> map)`
`IgniteFuture<Void>` `putAllAsync(Map<? extends K,? extends V> map)` Asynchronously copies all of the entries from the specified map to the `Cache`.
`IgniteFuture<Void>` `putAsync(K key, V val)` Asynchronously associates the specified value with the specified key in the cache.
`boolean` `putIfAbsent(K key, V val)` For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries.
`IgniteFuture<Boolean>` `putIfAbsentAsync(K key, V val)` Asynchronously associates the specified key with the given value if it is not already associated with a value.
`<R> QueryCursor<R>` `query(Query<R> qry)` Queries cache.
`<T,R> QueryCursor<R>` `query(Query<T> qry, IgniteClosure<T,R> transformer)` Queries the cache transforming the entries on the server nodes.
`FieldsQueryCursor<List<?>>` `query(SqlFieldsQuery qry)` Queries cache.
`Collection<? extends QueryDetailMetrics>` `queryDetailMetrics()` Gets query detail metrics.
`QueryMetrics` `queryMetrics()` Gets query metrics.
`List<FieldsQueryCursor<List<?>>>` `queryMultipleStatements(SqlFieldsQuery qry)` Queries cache with multiple statements.
`void` `readExternal(ObjectInput in)`
`IgniteFuture<Boolean>` `rebalance()` This cache node to re-balance its partitions.
`void` `registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> lsnrCfg)`
`void` `registrateFutureRestart(GridFutureAdapter<?> fut)`
`boolean` `remove(K key)`
`boolean` `remove(K key, V oldVal)` For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries.
`void` `removeAll()` Removes all of the mappings from this cache.
`void` `removeAll(Set<? extends K> keys)`
`IgniteFuture<Void>` `removeAllAsync()` Asynchronously removes all of the mappings from this cache.
`IgniteFuture<Void>` `removeAllAsync(Set<? extends K> keys)` Asynchronously removes entries for the specified keys.
`IgniteFuture<Boolean>` `removeAsync(K key)` Asynchronously removes the mapping for a key from this cache if it is present.
`IgniteFuture<Boolean>` `removeAsync(K key, V oldVal)` Asynchronously removes the mapping for a key only if currently mapped to the given value.
`boolean` `replace(K key, V val)`
`boolean` `replace(K key, V oldVal, V newVal)` For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries.
`IgniteFuture<Boolean>` `replaceAsync(K key, V val)` Asynchronously replaces the entry for a key only if currently mapped to a given value.
`IgniteFuture<Boolean>` `replaceAsync(K key, V oldVal, V newVal)` Asynchronous version of the `IgniteCache.replace(Object, Object, Object)`.
`void` `resetQueryDetailMetrics()` Reset query detail metrics.
`void` `resetQueryMetrics()` Reset query metrics.
`void` `setCacheManager(CacheManager cacheMgr)`
`int` `size(CachePeekMode... peekModes)` Gets the number of all entries cached across all nodes.
`IgniteFuture<Integer>` `sizeAsync(CachePeekMode... peekModes)` Asynchronously gets the number of all entries cached across all nodes.
`long` `sizeLong(CachePeekMode... peekModes)` Gets the number of all entries cached across all nodes as a long value.
`long` `sizeLong(int part, CachePeekMode... peekModes)` Gets the number of all entries cached in a partition as a long value.
`IgniteFuture<Long>` `sizeLongAsync(CachePeekMode... peekModes)` Asynchronously gets the number of all entries cached across all nodes as a long value.
`IgniteFuture<Long>` `sizeLongAsync(int part, CachePeekMode... peekModes)` Asynchronously gets the number of all entries cached in a partition as a long value.
`IgniteCache<K,V>` `skipStore()`
`org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.RestartFuture` `suspend()` Suspend this cache proxy.
`String` `toString()`
`<T> T` `unwrap(Class<T> clazz)`
`IgniteCache<K,V>` `withAllowAtomicOpsInTx()` By default atomic operations are allowed in transaction.
`IgniteCache<K,V>` `withDataCenterId(byte dataCenterId)`
`IgniteCache<K,V>` `withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)` Returns cache with the specified expired policy set.
`<K1,V1> IgniteCache<K1,V1>` `withKeepBinary()` Returns cache that will operate with binary objects.
`IgniteCache<K,V>` `withNoRetries()`
`IgniteCache<K,V>` `withPartitionRecover()` Gets an instance of `IgniteCache` that will be allowed to execute cache operations (read, write) regardless of partition loss policy.
`IgniteCache<K,V>` `withReadRepair()` This is an experimental API.
`IgniteCache<K,V>` `withSkipStore()`
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class org.apache.ignite.internal.AsyncSupportAdapter

`future, future, isAsync, saveOrGet, withAsync`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.ignite.IgniteCache

`withAsync`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Methods inherited from interface org.apache.ignite.lang.IgniteAsyncSupport

`future, isAsync`

### Constructor Detail

#### IgniteCacheProxyImpl

    public IgniteCacheProxyImpl()

Empty constructor required for `Externalizable`.

#### IgniteCacheProxyImpl

    public IgniteCacheProxyImpl(@NotNull
                                @NotNull GridCacheContext<K,V> ctx,
                                @NotNull
                                @NotNull IgniteInternalCache<K,V> delegate,
                                boolean async)

Parameters:
  `ctx` - Context.
  `delegate` - Delegate.
  `async` - Async support flag.

### Method Detail

#### getInitLatch

    public CountDownLatch getInitLatch()

Returns:
  Init latch.

#### context

    public GridCacheContext<K,V> context()

Specified by:
  `context` in interface `IgniteCacheProxy<K,V>`
Returns:
  Context.

#### context0

    public GridCacheContext<K,V> context0()

Returns:
  Context.

#### cacheNoGate

    public IgniteCacheProxy<K,V> cacheNoGate()

Gets cache proxy which does not acquire read lock on gateway enter, should be used only if grid read lock is externally acquired.

Specified by:
  `cacheNoGate` in interface `IgniteCacheProxy<K,V>`
Returns:
  Ignite cache proxy with simple gate.

#### gatewayWrapper

    public IgniteCacheProxy<K,V> gatewayWrapper()

Returns:
  Default cached proxy wrapper `GatewayProtectedCacheProxy`.

#### metrics

    public CacheMetrics metrics()

Gets whole cluster snapshot metrics (statistics) for this cache.

Specified by:
  `metrics` in interface `IgniteCache<K,V>`
Returns:
  Cache metrics.

#### metrics

    public CacheMetrics metrics(ClusterGroup grp)

Gets cluster group snapshot metrics for caches in cluster group.

Specified by:
  `metrics` in interface `IgniteCache<K,V>`
Parameters:
  `grp` - Cluster group.
Returns:
  Cache metrics.

#### localMetrics

    public CacheMetrics localMetrics()

Gets local snapshot metrics (statistics) for this cache.

Specified by:
  `localMetrics` in interface `IgniteCache<K,V>`
Returns:
  Cache metrics.

#### mxBean

    public CacheMetricsMXBean mxBean()

Gets whole cluster MxBean for this cache.

Specified by:
  `mxBean` in interface `IgniteCache<K,V>`
Returns:
  MxBean.

#### localMxBean

    public CacheMetricsMXBean localMxBean()

Gets local MxBean for this cache.

Specified by:
  `localMxBean` in interface `IgniteCache<K,V>`
Returns:
  MxBean.

#### getConfiguration

    public <C extends javax.cache.configuration.Configuration<K,V>> C getConfiguration(Class<C> clazz)

Specified by:
  `getConfiguration` in interface `javax.cache.Cache<K,V>`
Specified by:
  `getConfiguration` in interface `IgniteCache<K,V>`

#### withExpiryPolicy

    public IgniteCache<K,V> withExpiryPolicy(javax.cache.expiry.ExpiryPolicy plc)

Returns cache with the specified expired policy set. This policy will be used for each operation invoked on the returned cache.

This method does not modify existing cache instance.

Specified by:
  `withExpiryPolicy` in interface `IgniteCache<K,V>`
Parameters:
  `plc` - Expire policy to use.
Returns:
  Cache instance with the specified expiry policy set.

#### withSkipStore

    public IgniteCache<K,V> withSkipStore()

Specified by:
  `withSkipStore` in interface `IgniteCache<K,V>`
Returns:
  Cache with read-through write-through behavior disabled.

#### withKeepBinary

    public <K1,V1> IgniteCache<K1,V1> withKeepBinary()

Returns cache that will operate with binary objects.

Cache returned by this method will not be forced to deserialize binary objects, so keys and values will be returned from cache API methods without changes. Therefore, signature of the cache can contain only following types:

- `org.apache.ignite.binary.BinaryObject` for binary classes
- All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)
- Arrays of primitives (byte[], int[], ...)
- `String` and array of `String`s
- `UUID` and array of `UUID`s
- `Date` and array of `Date`s
- `Timestamp` and array of `Timestamp`s
- Enums and array of enums
- Maps, collections and array of objects (but objects inside them will still be converted if they are binary)

For example, if you use `Integer` as a key and `Value` class as a value (which will be stored in binary format), you should acquire following projection to avoid deserialization:

     IgniteCache<Integer, BinaryObject> prj = cache.withKeepBinary();

     // Value is not deserialized and returned in binary format.
     BinaryObject po = prj.get(1);

Note that this method makes sense only if cache is working in binary mode if default marshaller is used. If not, this method is no-op and will return current cache.

Specified by:
  `withKeepBinary` in interface `IgniteCache<K,V>`
Returns:
  New cache instance for binary objects.

#### withNoRetries

    public IgniteCache<K,V> withNoRetries()

Specified by:
  `withNoRetries` in interface `IgniteCache<K,V>`
Returns:
  Cache with no-retries behavior enabled.

#### withPartitionRecover

    public IgniteCache<K,V> withPartitionRecover()

Gets an instance of `IgniteCache` that will be allowed to execute cache operations (read, write) regardless of partition loss policy.

Specified by:
  `withPartitionRecover` in interface `IgniteCache<K,V>`
Returns:
  Cache without partition loss protection.

#### withReadRepair

    public IgniteCache<K,V> withReadRepair()

This is an experimental API.

Gets an instance of `IgniteCache` that will perform backup nodes check on each get attempt.

Read Repair means that each backup node will be checked to have the same entry as primary node has, and in case consistency violation found:

- for transactional caches:

  values across the topology will be replaced by latest versioned value:

  - automatically for transactions that have `TransactionConcurrency.OPTIMISTIC` concurrency mode or `TransactionIsolation.READ_COMMITTED` isolation level
  - at commit() phase for transactions that have `TransactionConcurrency.PESSIMISTIC` concurrency mode and isolation level other than `TransactionIsolation.READ_COMMITTED`

  consistency violation event will be recorded in case it's configured as recordable

- for atomic caches: consistency violation exception will be thrown. Be aware that consistency violation event will not be recorded in this case.

One more important thing is that this proxy usage does not guarantee "all copies check" in case value already cached inside the transaction. In case you use !READ_COMMITTED isolation mode and already have cached value, for example already read the value or performed a write, you'll gain the cached value.

Due to the nature of the atomic cache, false-positive results can be observed. For example, an attempt to check consistency under cache loading may lead to consistency violation exception. By default, the implementation tries to check the given key three times. The number of attempts can be changed using `IgniteSystemProperties.IGNITE_NEAR_GET_MAX_REMAPS` property.

Consistency check is incompatible with the following cache configurations:

- Caches without backups.
- Local caches.
- Near caches.
- Caches that use "read-through" mode.

Full list of repairable methods:

- `IgniteCache.containsKey(K)` && `IgniteCache.containsKeyAsync(K)`
- `IgniteCache.containsKeys(java.util.Set<? extends K>)` && `IgniteCache.containsKeysAsync(java.util.Set<? extends K>)`
- `IgniteCache.getEntry(K)` && `IgniteCache.getEntryAsync(K)`
- `IgniteCache.getEntries(java.util.Set<? extends K>)` && `IgniteCache.getEntriesAsync(java.util.Set<? extends K>)`
- `IgniteCache.get(K)` && `IgniteCache.getAsync(K)`
- `IgniteCache.getAll(java.util.Set<? extends K>)` && `IgniteCache.getAllAsync(java.util.Set<? extends K>)`

Specified by:
  `withReadRepair` in interface `IgniteCache<K,V>`
Returns:
  Cache with explicit consistency check on each read and repair if necessary.

#### loadCache

    public void loadCache(@Nullable
                          @Nullable IgniteBiPredicate<K,V> p,
                          @Nullable
                          Object... args)

Executes `IgniteCache.localLoadCache(IgniteBiPredicate, Object...)` on all cache nodes.

Specified by:
  `loadCache` in interface `IgniteCache<K,V>`
Parameters:
  `p` - Optional predicate (may be `null`). If provided, will be used to filter values loaded from storage before they are put into cache.
  `args` - Optional user arguments to be passed into `CacheStore.loadCache(IgniteBiInClosure, Object...)` method.

#### loadCacheAsync

    public IgniteFuture<Void> loadCacheAsync(@Nullable
                                             @Nullable IgniteBiPredicate<K,V> p,
                                             @Nullable
                                             Object... args)
                                      throws javax.cache.CacheException

Asynchronously executes `IgniteCache.localLoadCache(IgniteBiPredicate, Object...)` on all cache nodes.

Specified by:
  `loadCacheAsync` in interface `IgniteCache<K,V>`
Parameters:
  `p` - Optional predicate (may be `null`). If provided, will be used to filter values loaded from storage before they are put into cache.
  `args` - Optional user arguments to be passed into `CacheStore.loadCache(IgniteBiInClosure, Object...)` method.
Returns:
  a Future representing pending completion of the cache loading.
Throws:
  `javax.cache.CacheException` - If loading failed.

#### localLoadCache

    public void localLoadCache(@Nullable
                               @Nullable IgniteBiPredicate<K,V> p,
                               @Nullable
                               Object... args)

Delegates to `CacheStore.loadCache(IgniteBiInClosure,Object...)` method to load state from the underlying persistent storage. The loaded values will then be given to the optionally passed in predicate, and, if the predicate returns `true`, will be stored in cache. If predicate is `null`, then all loaded values will be stored in cache.

Note that this method does not receive keys as a parameter, so it is up to `CacheStore` implementation to provide all the data to be loaded.

This method is not transactional and may end up loading a stale value into cache if another thread has updated the value immediately after it has been loaded. It is mostly useful when pre-loading the cache from underlying data store before start, or for read-only caches.

Specified by:
  `localLoadCache` in interface `IgniteCache<K,V>`
Parameters:
  `p` - Optional predicate (may be `null`). If provided, will be used to filter values to be put into cache.
  `args` - Optional user arguments to be passed into `CacheStore.loadCache(IgniteBiInClosure, Object...)` method.

#### localLoadCacheAsync

    public IgniteFuture<Void> localLoadCacheAsync(@Nullable
                                                  @Nullable IgniteBiPredicate<K,V> p,
                                                  @Nullable
                                                  Object... args)
                                           throws javax.cache.CacheException

Asynchronously loads state from the underlying persistent storage by delegating to `CacheStore.loadCache(IgniteBiInClosure,Object...)` method. The loaded values will then be given to the optionally passed in predicate, and, if the predicate returns `true`, will be stored in cache. If predicate is `null`, then all loaded values will be stored in cache.

Note that this method does not receive keys as a parameter, so it is up to `CacheStore` implementation to provide all the data to be loaded.

This method is not transactional and may end up loading a stale value into cache if another thread has updated the value immediately after it has been loaded. It is mostly useful when pre-loading the cache from underlying data store before start, or for read-only caches.

Specified by:
  `localLoadCacheAsync` in interface `IgniteCache<K,V>`
Parameters:
  `p` - Optional predicate (may be `null`). If provided, will be used to filter values to be put into cache.
  `args` - Optional user arguments to be passed into `CacheStore.loadCache(IgniteBiInClosure, Object...)` method.
Returns:
  a Future representing pending completion of the cache loading.
Throws:
  `javax.cache.CacheException` - If loading failed.

#### getAndPutIfAbsent

    @Nullable
    public V getAndPutIfAbsent(K key,
                                         V val)
                                  throws javax.cache.CacheException

Stores given key-value pair in cache only if cache had no previous mapping for it. If cache previously contained value for the given key, then this value is returned. In case of `CacheMode.PARTITIONED` or `CacheMode.REPLICATED` caches, the value will be loaded from the primary node, which in its turn may load the value from the swap storage, and consecutively, if it's not in swap, from the underlying persistent storage. If value has to be loaded from persistent storage, `CacheLoader.load(Object)` method will be used.

If the returned value is not needed, method `IgniteCache.putIfAbsent(Object, Object)` should always be used instead of this one to avoid the overhead associated with returning of the previous value.

If write-through is enabled, the stored value will be persisted to `CacheStore` via `CacheWriter.write(javax.cache.Cache.Entry)` method.

## Transactions

This method is transactional and will enlist the entry into ongoing transaction if there is one.

Specified by:
  `getAndPutIfAbsent` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to store in cache.
  `val` - Value to be associated with the given key.
Returns:
  Previously contained value regardless of whether put happened or not (`null` if there was no previous value).
Throws:
  `javax.cache.CacheException` - If put operation failed.

#### getAndPutIfAbsentAsync

    public IgniteFuture<V> getAndPutIfAbsentAsync(K key,
                                                  V val)
                                           throws javax.cache.CacheException

Asynchronously stores given key-value pair in cache only if cache had no previous mapping for it. If cache previously contained value for the given key, then this value is returned. In case of `CacheMode.PARTITIONED` or `CacheMode.REPLICATED` caches, the value will be loaded from the primary node, which in its turn may load the value from the swap storage, and consecutively, if it's not in swap, from the underlying persistent storage. If value has to be loaded from persistent storage, `CacheLoader.load(Object)` method will be used.

If the returned value is not needed, method `IgniteCache.putIfAbsentAsync(Object, Object)` should always be used instead of this one to avoid the overhead associated with returning of the previous value.

If write-through is enabled, the stored value will be persisted to `CacheStore` via `CacheWriter.write(javax.cache.Cache.Entry)` method.

## Transactions

This method is transactional and will enlist the entry into ongoing transaction if there is one.

Specified by:
  `getAndPutIfAbsentAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to store in cache.
  `val` - Value to be associated with the given key.
Returns:
  a Future representing pending completion of the operation.
Throws:
  `javax.cache.CacheException` - If put operation failed.

#### lock

    public Lock lock(K key)
              throws javax.cache.CacheException

Creates a `Lock` instance associated with passed key. This method does not acquire lock immediately, you have to call appropriate method on returned instance. Returned lock does not support `Lock.newCondition()` method, other methods defined in `Lock` are supported.

Specified by:
  `lock` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key for lock.
Returns:
  New lock instance associated with passed key.
Throws:
  `javax.cache.CacheException`
See Also:
  `Lock.lock()`, `Lock.tryLock(long, TimeUnit)`

#### lockAll

    public Lock lockAll(Collection<? extends K> keys)

Creates a `Lock` instance associated with passed keys. This method does not acquire lock immediately, you have to call appropriate method on returned instance. Returned lock does not support `Lock.newCondition()` method, other methods defined in `Lock` are supported.

Specified by:
  `lockAll` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys for lock.
Returns:
  New lock instance associated with passed key.
See Also:
  `Lock.lock()`, `Lock.tryLock(long, TimeUnit)`

#### isLocalLocked

    public boolean isLocalLocked(K key,
                                 boolean byCurrThread)

Checks if specified key is locked.

This is a local in-VM operation and does not involve any network trips or access to persistent storage in any way.

Specified by:
  `isLocalLocked` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to check.
  `byCurrThread` - If `true` method will check that current thread owns a lock on this key, other vise will check that any thread on any node owns a lock on this key.
Returns:
  `True` if lock is owned by some node.

#### query

    public FieldsQueryCursor<List<?>> query(SqlFieldsQuery qry)

Queries cache. Accepts `SqlFieldsQuery` class.

Specified by:
  `query` in interface `IgniteCache<K,V>`
Parameters:
  `qry` - SqlFieldsQuery.
Returns:
  Cursor.
See Also:
  `SqlFieldsQuery`

#### queryMultipleStatements

    public List<FieldsQueryCursor<List<?>>> queryMultipleStatements(SqlFieldsQuery qry)

Queries cache with multiple statements. Accepts `SqlFieldsQuery` class.

Specified by:
  `queryMultipleStatements` in interface `IgniteCacheProxy<K,V>`
Parameters:
  `qry` - SqlFieldsQuery.
Returns:
  List of cursors.
See Also:
  `SqlFieldsQuery`

#### query

    public <R> QueryCursor<R> query(Query<R> qry)

Queries cache. Accepts any subclass of `Query` interface. See also `IgniteCache.query(SqlFieldsQuery)`.

Specified by:
  `query` in interface `IgniteCache<K,V>`
Parameters:
  `qry` - Query.
Returns:
  Cursor.
See Also:
  `ScanQuery`, `SqlFieldsQuery`, `TextQuery`, `SpiQuery`

#### query

    public <T,R> QueryCursor<R> query(Query<T> qry,
                                      IgniteClosure<T,R> transformer)

Queries the cache transforming the entries on the server nodes. Can be used, for example, to avoid network overhead in case only one field out of the large is required by client.

Currently transformers are supported ONLY for `ScanQuery`. Passing any other subclass of `Query` interface to this method will end up with `UnsupportedOperationException`.

Specified by:
  `query` in interface `IgniteCache<K,V>`
Parameters:
  `qry` - Query.
  `transformer` - Transformer.
Returns:
  Cursor.

#### localEntries

    public Iterable<javax.cache.Cache.Entry<K,V>> localEntries(CachePeekMode... peekModes)
                                                        throws javax.cache.CacheException

Allows for iteration over local cache entries.

Specified by:
  `localEntries` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Peek modes.
Returns:
  Iterable over local cache entries.
Throws:
  `javax.cache.CacheException` - If failed.

#### queryMetrics

    public QueryMetrics queryMetrics()

Gets query metrics.

Specified by:
  `queryMetrics` in interface `IgniteCache<K,V>`
Returns:
  Metrics.

#### resetQueryMetrics

    public void resetQueryMetrics()

Reset query metrics.

Specified by:
  `resetQueryMetrics` in interface `IgniteCache<K,V>`

#### queryDetailMetrics

    public Collection<? extends QueryDetailMetrics> queryDetailMetrics()

Gets query detail metrics. Query detail metrics could be enabled via `CacheConfiguration.setQueryDetailMetricsSize(int)` method.

Specified by:
  `queryDetailMetrics` in interface `IgniteCache<K,V>`
Returns:
  Metrics.

#### resetQueryDetailMetrics

    public void resetQueryDetailMetrics()

Reset query detail metrics.

Specified by:
  `resetQueryDetailMetrics` in interface `IgniteCache<K,V>`

#### localEvict

    public void localEvict(Collection<? extends K> keys)

Attempts to evict all entries associated with keys. Note, that entry will be evicted only if it's not used (not participating in any locks or transactions).

Specified by:
  `localEvict` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys to evict.

#### localPeek

    @Nullable
    public V localPeek(K key,
                                 CachePeekMode... peekModes)

Peeks at a value in the local storage using an optional peek mode.

This method will not load a value from the configured `CacheStore` or from a remote node.

## Transactions

This method does not participate in any transactions.

Specified by:
  `localPeek` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Entry key.
  `peekModes` - Peek modes.
Returns:
  Peeked value, or `null` if not found.

#### size

    public int size(CachePeekMode... peekModes)
             throws javax.cache.CacheException

Gets the number of all entries cached across all nodes. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their cache sizes.

Specified by:
  `size` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  Cache size across all nodes.
Throws:
  `javax.cache.CacheException` - On error.

#### sizeAsync

    public IgniteFuture<Integer> sizeAsync(CachePeekMode... peekModes)
                                    throws javax.cache.CacheException

Asynchronously gets the number of all entries cached across all nodes. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their cache sizes.

Specified by:
  `sizeAsync` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  a Future representing pending completion of the operation.
Throws:
  `javax.cache.CacheException` - On error.

#### sizeLong

    public long sizeLong(CachePeekMode... peekModes)
                  throws javax.cache.CacheException

Gets the number of all entries cached across all nodes as a long value. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their cache sizes.

Specified by:
  `sizeLong` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  Cache size across all nodes.
Throws:
  `javax.cache.CacheException` - On error.

#### sizeLongAsync

    public IgniteFuture<Long> sizeLongAsync(CachePeekMode... peekModes)
                                     throws javax.cache.CacheException

Asynchronously gets the number of all entries cached across all nodes as a long value. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their cache sizes.

Specified by:
  `sizeLongAsync` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  a Future representing pending completion of the operation.
Throws:
  `javax.cache.CacheException` - On error.

#### sizeLong

    public long sizeLong(int part,
                         CachePeekMode... peekModes)
                  throws javax.cache.CacheException

Gets the number of all entries cached in a partition as a long value. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their partition cache sizes.

Specified by:
  `sizeLong` in interface `IgniteCache<K,V>`
Parameters:
  `part` - partition.
  `peekModes` - Optional peek modes. If not provided, then total partition cache size is returned.
Returns:
  Partition cache size across all nodes.
Throws:
  `javax.cache.CacheException` - On error.

#### sizeLongAsync

    public IgniteFuture<Long> sizeLongAsync(int part,
                                            CachePeekMode... peekModes)
                                     throws javax.cache.CacheException

Asynchronously gets the number of all entries cached in a partition as a long value. By default, if `peekModes` value isn't defined, only size of primary copies across all nodes will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

NOTE: this operation is distributed and will query all participating nodes for their partition cache sizes.

Specified by:
  `sizeLongAsync` in interface `IgniteCache<K,V>`
Parameters:
  `part` - partition.
  `peekModes` - Optional peek modes. If not provided, then total partition cache size is returned.
Returns:
  a Future representing pending completion of the operation.
Throws:
  `javax.cache.CacheException` - On error.

#### localSize

    public int localSize(CachePeekMode... peekModes)

Gets the number of all entries cached on this node. By default, if `peekModes` value isn't defined, only size of primary copies will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

Specified by:
  `localSize` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  Cache size on this node.

#### localSizeLong

    public long localSizeLong(CachePeekMode... peekModes)

Gets the number of all entries cached on this node as a long value. By default, if `peekModes` value isn't defined, only size of primary copies will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

Specified by:
  `localSizeLong` in interface `IgniteCache<K,V>`
Parameters:
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  Cache size on this node.

#### localSizeLong

    public long localSizeLong(int part,
                              CachePeekMode... peekModes)

Gets the number of all entries cached on this node for the partition as a long value. By default, if `peekModes` value isn't defined, only size of primary copies will be returned. This behavior is identical to calling this method with `CachePeekMode.PRIMARY` peek mode.

Specified by:
  `localSizeLong` in interface `IgniteCache<K,V>`
Parameters:
  `part` - partition.
  `peekModes` - Optional peek modes. If not provided, then total cache size is returned.
Returns:
  Cache size on this node.

#### get

    public V get(K key)

Specified by:
  `get` in interface `javax.cache.Cache<K,V>`
Specified by:
  `get` in interface `IgniteCache<K,V>`

#### getAsync

    public IgniteFuture<V> getAsync(K key)

Asynchronously gets an entry from the cache.

If the cache is configured to use read-through, and a future result would be null because the entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry.

Specified by:
  `getAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
Returns:
  a Future representing pending completion of the operation.

#### getEntry

    public CacheEntry<K,V> getEntry(K key)

Gets an entry from the cache.

If the cache is configured to use read-through, and get would return null because the entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry.

Specified by:
  `getEntry` in interface `IgniteCache<K,V>`
Parameters:
  `key` - The key whose associated value is to be returned.
Returns:
  The element, or null, if it does not exist.

#### getEntryAsync

    public IgniteFuture<CacheEntry<K,V>> getEntryAsync(K key)

Asynchronously gets an entry from the cache.

If the cache is configured to use read-through, and a future result would be null because the entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry.

Specified by:
  `getEntryAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - The key whose associated value is to be returned.
Returns:
  a Future representing pending completion of the operation.

#### getAll

    public Map<K,V> getAll(Set<? extends K> keys)

Specified by:
  `getAll` in interface `javax.cache.Cache<K,V>`
Specified by:
  `getAll` in interface `IgniteCache<K,V>`

#### getAllAsync

    public IgniteFuture<Map<K,V>> getAllAsync(Set<? extends K> keys)

Asynchronously gets a collection of entries from the `Cache`, returning them as `Map` of the values associated with the set of keys requested.

If the cache is configured read-through, and a future result for a key would be null because an entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry. If an entry cannot be loaded for a given key, the key will not be present in the returned Map.

Specified by:
  `getAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys set.
Returns:
  a Future representing pending completion of the operation.

#### getEntries

    public Collection<CacheEntry<K,V>> getEntries(Set<? extends K> keys)

Gets a collection of entries from the `Cache`.

If the cache is configured read-through, and a get for a key would return null because an entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry. If an entry cannot be loaded for a given key, the key will not be present in the returned Collection.

Specified by:
  `getEntries` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The keys whose associated values are to be returned.
Returns:
  A collection of entries that were found for the given keys. Entries not found in the cache are not in the returned collection.

#### getEntriesAsync

    public IgniteFuture<Collection<CacheEntry<K,V>>> getEntriesAsync(Set<? extends K> keys)

Asynchronously gets a collection of entries from the `Cache`.

If the cache is configured read-through, and a future result for a key would be null because an entry is missing from the cache, the Cache's `CacheLoader` is called in an attempt to load the entry. If an entry cannot be loaded for a given key, the key will not be present in the returned Collection.

Specified by:
  `getEntriesAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The keys whose associated values are to be returned.
Returns:
  a Future representing pending completion of the operation.

#### getAllOutTx

    public Map<K,V> getAllOutTx(Set<? extends K> keys)

Gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries and will not lock any keys if pessimistic transaction is started by thread.

Specified by:
  `getAllOutTx` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The keys whose associated values are to be returned.
Returns:
  A map of entries that were found for the given keys.

#### getAllOutTxAsync

    public IgniteFuture<Map<K,V>> getAllOutTxAsync(Set<? extends K> keys)

Asynchronously gets values from cache. Will bypass started transaction, if any, i.e. will not enlist entries and will not lock any keys if pessimistic transaction is started by thread.

Specified by:
  `getAllOutTxAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The keys whose associated values are to be returned.
Returns:
  a Future representing pending completion of the operation.

#### getAll

    public Map<K,V> getAll(Collection<? extends K> keys)

Parameters:
  `keys` - Keys.
Returns:
  Values map.

#### containsKey

    public boolean containsKey(K key)

Specified by:
  `containsKey` in interface `javax.cache.Cache<K,V>`
Specified by:
  `containsKey` in interface `IgniteCache<K,V>`

#### containsKeyAsync

    public IgniteFuture<Boolean> containsKeyAsync(K key)

Asynchronously determines if the `Cache` contains an entry for the specified key.

More formally, future result is `true` if and only if this cache contains a mapping for a key `k` such that `key.equals(k)`. (There can be at most one such mapping.)

Specified by:
  `containsKeyAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
Returns:
  a Future representing pending completion of the operation.

#### containsKeys

    public boolean containsKeys(Set<? extends K> keys)

Determines if the `Cache` contains entries for the specified keys.

Specified by:
  `containsKeys` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Key whose presence in this cache is to be tested.
Returns:
  `True` if this cache contains a mapping for the specified keys.

#### containsKeysAsync

    public IgniteFuture<Boolean> containsKeysAsync(Set<? extends K> keys)

Asynchronously determines if the `Cache` contains entries for the specified keys.

Specified by:
  `containsKeysAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Key whose presence in this cache is to be tested.
Returns:
  a Future representing pending completion of the operation.

#### loadAll

    public void loadAll(Set<? extends K> keys,
                        boolean replaceExisting,
                        @Nullable
                        @Nullable javax.cache.integration.CompletionListener completionLsnr)

Specified by:
  `loadAll` in interface `javax.cache.Cache<K,V>`

#### put

    public void put(K key,
                    V val)

Specified by:
  `put` in interface `javax.cache.Cache<K,V>`
Specified by:
  `put` in interface `IgniteCache<K,V>`

#### putAsync

    public IgniteFuture<Void> putAsync(K key,
                                       V val)

Asynchronously associates the specified value with the specified key in the cache.

If the `Cache` previously contained a mapping for the key, the old value is replaced by the specified value. (A cache `c` is said to contain a mapping for a key `k` if and only if `c.containsKey(k)` would return `true`.)

Specified by:
  `putAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `val` - Value.
Returns:
  a Future representing pending completion of the operation.

#### getAndPut

    public V getAndPut(K key,
                       V val)

Specified by:
  `getAndPut` in interface `javax.cache.Cache<K,V>`
Specified by:
  `getAndPut` in interface `IgniteCache<K,V>`

#### getAndPutAsync

    public IgniteFuture<V> getAndPutAsync(K key,
                                          V val)

Asynchronously associates the specified value with the specified key in this cache, returning an existing value if one existed as the future result.

If the cache previously contained a mapping for the key, the old value is replaced by the specified value. (A cache `c` is said to contain a mapping for a key `k` if and only if `c.containsKey(k)` would return `true`.)

The previous value is returned as the future result, or future result is null if there was no value associated with the key previously.

Specified by:
  `getAndPutAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `val` - Value.
Returns:
  a Future representing pending completion of the operation.

#### putAll

    public void putAll(Map<? extends K,? extends V> map)

Specified by:
  `putAll` in interface `javax.cache.Cache<K,V>`
Specified by:
  `putAll` in interface `IgniteCache<K,V>`

#### putAllAsync

    public IgniteFuture<Void> putAllAsync(Map<? extends K,? extends V> map)

Asynchronously copies all of the entries from the specified map to the `Cache`.

The effect of this call is equivalent to that of calling `IgniteCache.putAsync(Object, Object)` putAsync(k, v)} on this cache once for each mapping from key `k` to value `v` in the specified map.

The order in which the individual puts occur is undefined.

The behavior of this operation is undefined if entries in the cache corresponding to entries in the map are modified or removed while this operation is in progress. or if map is modified while the operation is in progress.

In Default Consistency mode, individual puts occur atomically but not the entire putAll. Listeners may observe individual updates.

Specified by:
  `putAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `map` - Map containing keys and values to put into the cache.
Returns:
  a Future representing pending completion of the operation.

#### putIfAbsent

    public boolean putIfAbsent(K key,
                               V val)

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `putIfAbsent` in interface `javax.cache.Cache<K,V>`
Specified by:
  `putIfAbsent` in interface `IgniteCache<K,V>`

#### putIfAbsentAsync

    public IgniteFuture<Boolean> putIfAbsentAsync(K key,
                                                  V val)

Asynchronously associates the specified key with the given value if it is not already associated with a value.

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `putIfAbsentAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `val` - Value.
Returns:
  a Future representing pending completion of the operation.

#### remove

    public boolean remove(K key)

Specified by:
  `remove` in interface `javax.cache.Cache<K,V>`
Specified by:
  `remove` in interface `IgniteCache<K,V>`

#### removeAsync

    public IgniteFuture<Boolean> removeAsync(K key)

Asynchronously removes the mapping for a key from this cache if it is present.

More formally, if this cache contains a mapping from key `k` to value `v` such that `(key==null ? k==null : key.equals(k))`, that mapping is removed. (The cache can contain at most one such mapping.)

A future result is `true` if this cache previously associated the key, or `false` if the cache contained no mapping for the key.

The cache will not contain a mapping for the specified key once the returned future is completed.

Specified by:
  `removeAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
Returns:
  a Future representing pending completion of the operation.

#### remove

    public boolean remove(K key,
                          V oldVal)

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `remove` in interface `javax.cache.Cache<K,V>`
Specified by:
  `remove` in interface `IgniteCache<K,V>`

#### removeAsync

    public IgniteFuture<Boolean> removeAsync(K key,
                                             V oldVal)

Asynchronously removes the mapping for a key only if currently mapped to the given value.

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `removeAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `oldVal` - Old value.
Returns:
  a Future representing pending completion of the operation.

#### getAndRemove

    public V getAndRemove(K key)

Specified by:
  `getAndRemove` in interface `javax.cache.Cache<K,V>`
Specified by:
  `getAndRemove` in interface `IgniteCache<K,V>`

#### getAndRemoveAsync

    public IgniteFuture<V> getAndRemoveAsync(K key)

Asynchronously removes the entry for a key only if currently mapped to some value.

Specified by:
  `getAndRemoveAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
Returns:
  a Future representing pending completion of the operation.

#### replace

    public boolean replace(K key,
                           V oldVal,
                           V newVal)

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `replace` in interface `javax.cache.Cache<K,V>`
Specified by:
  `replace` in interface `IgniteCache<K,V>`

#### replaceAsync

    public IgniteFuture<Boolean> replaceAsync(K key,
                                              V oldVal,
                                              V newVal)

Asynchronous version of the `IgniteCache.replace(Object, Object, Object)`.

For `CacheAtomicityMode.ATOMIC` return value on primary node crash may be incorrect because of the automatic retries. It is recommended to disable retries with `IgniteCache.withNoRetries()` and manually restore primary-backup consistency in case of update failure.

Specified by:
  `replaceAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `oldVal` - Old value.
  `newVal` - New value.
Returns:
  a Future representing pending completion of the operation.

#### replace

    public boolean replace(K key,
                           V val)

Specified by:
  `replace` in interface `javax.cache.Cache<K,V>`
Specified by:
  `replace` in interface `IgniteCache<K,V>`

#### replaceAsync

    public IgniteFuture<Boolean> replaceAsync(K key,
                                              V val)

Asynchronously replaces the entry for a key only if currently mapped to a given value.

Specified by:
  `replaceAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `val` - Value.
Returns:
  a Future representing pending completion of the operation.

#### getAndReplace

    public V getAndReplace(K key,
                           V val)

Specified by:
  `getAndReplace` in interface `javax.cache.Cache<K,V>`
Specified by:
  `getAndReplace` in interface `IgniteCache<K,V>`

#### getAndReplaceAsync

    public IgniteFuture<V> getAndReplaceAsync(K key,
                                              V val)

Asynchronously replaces the value for a given key if and only if there is a value currently mapped by the key.

Specified by:
  `getAndReplaceAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key.
  `val` - Value.
Returns:
  a Future representing pending completion of the operation.

#### removeAll

    public void removeAll(Set<? extends K> keys)

Specified by:
  `removeAll` in interface `javax.cache.Cache<K,V>`
Specified by:
  `removeAll` in interface `IgniteCache<K,V>`

#### removeAllAsync

    public IgniteFuture<Void> removeAllAsync(Set<? extends K> keys)

Asynchronously removes entries for the specified keys.

The order in which the individual entries are removed is undefined.

For every entry in the key set, the following are called:

- any registered `CacheEntryRemovedListener`s
- if the cache is a write-through cache, the `CacheWriter`

If the key set is empty, the `CacheWriter` is not called.

Specified by:
  `removeAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys set.
Returns:
  a Future representing pending completion of the operation.

#### removeAll

    public void removeAll()

Removes all of the mappings from this cache.

The order that the individual entries are removed is undefined.

For every mapping that exists the following are called:

- any registered `CacheEntryRemovedListener`s
- if the cache is a write-through cache, the `CacheWriter`

If the cache is empty, the `CacheWriter` is not called.

This operation is not transactional. It calls broadcast closure that deletes all primary keys from remote nodes.

This is potentially an expensive operation as listeners are invoked. Use `IgniteCache.clear()` to avoid this.

Specified by:
  `removeAll` in interface `javax.cache.Cache<K,V>`
Specified by:
  `removeAll` in interface `IgniteCache<K,V>`
See Also:
  `IgniteCache.clear()`, `CacheWriter.deleteAll(java.util.Collection<?>)`

#### removeAllAsync

    public IgniteFuture<Void> removeAllAsync()

Asynchronously removes all of the mappings from this cache.

The order that the individual entries are removed is undefined.

For every mapping that exists the following are called:

- any registered `CacheEntryRemovedListener`s
- if the cache is a write-through cache, the `CacheWriter`

If the cache is empty, the `CacheWriter` is not called.

This is potentially an expensive operation as listeners are invoked. Use `IgniteCache.clearAsync()` to avoid this.

Specified by:
  `removeAllAsync` in interface `IgniteCache<K,V>`
Returns:
  a Future representing pending completion of the operation.
See Also:
  `IgniteCache.clearAsync()`, `CacheWriter.deleteAll(java.util.Collection<?>)`

#### clear

    public void clear(K key)

Clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Specified by:
  `clear` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to clear.

#### clearAsync

    public IgniteFuture<Void> clearAsync(K key)

Asynchronously clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Specified by:
  `clearAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to clear.
Returns:
  a Future representing pending completion of the operation.

#### clearAll

    public void clearAll(Set<? extends K> keys)

Clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Specified by:
  `clearAll` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys to clear.

#### clearAllAsync

    public IgniteFuture<Void> clearAllAsync(Set<? extends K> keys)

Asynchronously clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Specified by:
  `clearAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys to clear.
Returns:
  a Future representing pending completion of the operation.

#### clear

    public void clear()

Specified by:
  `clear` in interface `javax.cache.Cache<K,V>`
Specified by:
  `clear` in interface `IgniteCache<K,V>`

#### clearAsync

    public IgniteFuture<Void> clearAsync()

Asynchronously clears the contents of the cache, without notifying listeners or `CacheWriter`s.

Specified by:
  `clearAsync` in interface `IgniteCache<K,V>`
Returns:
  a Future representing pending completion of the operation.

#### localClear

    public void localClear(K key)

Clears entry from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Note that this operation is local as it merely clears an entry from local cache, it does not remove entries from remote caches.

Specified by:
  `localClear` in interface `IgniteCache<K,V>`
Parameters:
  `key` - Key to clear.

#### localClearAll

    public void localClearAll(Set<? extends K> keys)

Clears entries from the cache and swap storage, without notifying listeners or `CacheWriter`s. Entry is cleared only if it is not currently locked, and is not participating in a transaction.

Note that this operation is local as it merely clears an entry from local cache, it does not remove entries from remote caches.

Specified by:
  `localClearAll` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - Keys to clear.

#### invoke

    public <T> T invoke(K key,
                        javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
                        Object... args)
                 throws javax.cache.processor.EntryProcessorException

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invoke` in interface `javax.cache.Cache<K,V>`
Specified by:
  `invoke` in interface `IgniteCache<K,V>`
Throws:
  `javax.cache.processor.EntryProcessorException`

#### invokeAsync

    public <T> IgniteFuture<T> invokeAsync(K key,
                                           javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
                                           Object... args)

Asynchronously invokes an `EntryProcessor` against the `Cache.Entry` specified by the provided key. If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key with a null value is used instead.

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invokeAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - The key to the entry.
  `entryProcessor` - The `EntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `EntryProcessor`.
Returns:
  a Future representing pending completion of the operation.

#### invoke

    public <T> T invoke(K key,
                        CacheEntryProcessor<K,V,T> entryProcessor,
                        Object... args)
                 throws javax.cache.processor.EntryProcessorException

Invokes an `CacheEntryProcessor` against the `Cache.Entry` specified by the provided key. If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key with a null value is used instead.

An instance of entry processor must be stateless as it may be invoked multiple times on primary and backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always the same.

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invoke` in interface `IgniteCache<K,V>`
Parameters:
  `key` - The key to the entry.
  `entryProcessor` - The `CacheEntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `CacheEntryProcessor`.
Returns:
  The result of the processing, if any, defined by the `CacheEntryProcessor` implementation.
Throws:
  `javax.cache.processor.EntryProcessorException` - If an exception is thrown by the `CacheEntryProcessor`, a Caching Implementation must wrap any `Exception` thrown wrapped in an `EntryProcessorException`.
See Also:
  `CacheEntryProcessor`

#### invokeAsync

    public <T> IgniteFuture<T> invokeAsync(K key,
                                           CacheEntryProcessor<K,V,T> entryProcessor,
                                           Object... args)

Asynchronously invokes an `CacheEntryProcessor` against the `Cache.Entry` specified by the provided key. If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key with a null value is used instead.

An instance of entry processor must be stateless as it may be invoked multiple times on primary and backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always the same.

Specified by:
  `invokeAsync` in interface `IgniteCache<K,V>`
Parameters:
  `key` - The key to the entry.
  `entryProcessor` - The `CacheEntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `CacheEntryProcessor`.
Returns:
  a Future representing pending completion of the operation.
See Also:
  `CacheEntryProcessor`

#### invoke

    public <T> T invoke(@Nullable
                        @Nullable AffinityTopologyVersion topVer,
                        K key,
                        javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
                        Object... args)

Parameters:
  `topVer` - Locked topology version.
  `key` - Key.
  `entryProcessor` - Entry processor.
  `args` - Arguments.
Returns:
  Invoke result.

#### invokeAll

    public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
                                                                              javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
                                                                              Object... args)

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invokeAll` in interface `javax.cache.Cache<K,V>`
Specified by:
  `invokeAll` in interface `IgniteCache<K,V>`

#### invokeAllAsync

    public <T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys,
                                                                                                 javax.cache.processor.EntryProcessor<K,V,T> entryProcessor,
                                                                                                 Object... args)

Asynchronously invokes an `EntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.

If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key and a value of null is provided.

The order that the entries for the keys are processed is undefined. Implementations may choose to process the entries in any order, including concurrently. Furthermore there is no guarantee implementations will use the same `EntryProcessor` instance to process each entry, as the case may be in a non-local cache topology.

The result of executing the `EntryProcessor` is returned in the future as a `Map` of `EntryProcessorResult`s, one result per key. Should the `EntryProcessor` or Caching implementation throw an exception, the exception is wrapped and re-thrown when a call to `EntryProcessorResult.get()` is made.

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invokeAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The set of keys.
  `entryProcessor` - The `EntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `EntryProcessor`.
Returns:
  a Future representing pending completion of the operation.

#### invokeAll

    public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys,
                                                                              CacheEntryProcessor<K,V,T> entryProcessor,
                                                                              Object... args)

Invokes an `CacheEntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.

If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key and a value of null is provided.

The order that the entries for the keys are processed is undefined. Implementations may choose to process the entries in any order, including concurrently. Furthermore there is no guarantee implementations will use the same `CacheEntryProcessor` instance to process each entry, as the case may be in a non-local cache topology.

The result of executing the `CacheEntryProcessor` is returned as a `Map` of `EntryProcessorResult`s, one result per key. Should the `CacheEntryProcessor` or Caching implementation throw an exception, the exception is wrapped and re-thrown when a call to `EntryProcessorResult.get()` is made.

An instance of entry processor must be stateless as it may be invoked multiple times on primary and backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always the same.

Specified by:
  `invokeAll` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The set of keys for entries to process.
  `entryProcessor` - The `CacheEntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `CacheEntryProcessor`.
Returns:
  The map of `EntryProcessorResult`s of the processing per key, if any, defined by the `CacheEntryProcessor` implementation. No mappings will be returned for `CacheEntryProcessor`s that return a `null` value for a key.
See Also:
  `CacheEntryProcessor`

#### invokeAllAsync

    public <T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Set<? extends K> keys,
                                                                                                 CacheEntryProcessor<K,V,T> entryProcessor,
                                                                                                 Object... args)

Asynchronously invokes an `CacheEntryProcessor` against the set of `Cache.Entry`s specified by the set of keys.

If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key and a value of null is provided.

The order that the entries for the keys are processed is undefined. Implementations may choose to process the entries in any order, including concurrently. Furthermore there is no guarantee implementations will use the same `CacheEntryProcessor` instance to process each entry, as the case may be in a non-local cache topology.

The result of executing the `CacheEntryProcessor` is returned in the future as a `Map` of `EntryProcessorResult`s, one result per key. Should the `CacheEntryProcessor` or Caching implementation throw an exception, the exception is wrapped and re-thrown when a call to `EntryProcessorResult.get()` is made.

An instance of entry processor must be stateless as it may be invoked multiple times on primary and backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always the same.

Specified by:
  `invokeAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `keys` - The set of keys for entries to process.
  `entryProcessor` - The `CacheEntryProcessor` to invoke.
  `args` - Additional arguments to pass to the `CacheEntryProcessor`.
Returns:
  a Future representing pending completion of the operation.
See Also:
  `CacheEntryProcessor`

#### invokeAll

    public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
                                                                              Object... args)

Asynchronously invokes each `EntryProcessor` from map's values against the correspondent `Cache.Entry` specified by map's key set.

If an `Cache.Entry` does not exist for the specified key, an attempt is made to load it (if a loader is configured) or a surrogate `Cache.Entry`, consisting of the key and a value of null is provided.

The order that the entries for the keys are processed is undefined. Implementations may choose to process the entries in any order, including concurrently. Furthermore there is no guarantee implementations will use the same `EntryProcessor` instance to process each entry, as the case may be in a non-local cache topology.

The result of executing the `EntryProcessor` is returned in the future as a `Map` of `EntryProcessorResult`s, one result per key. Should the `EntryProcessor` or Caching implementation throw an exception, the exception is wrapped and re-thrown when a call to `EntryProcessorResult.get()` is made.

Please refer to documentation for `CacheAtomicityMode.ATOMIC` for information on system behavior in crash scenarios for atomic caches.

Specified by:
  `invokeAll` in interface `IgniteCache<K,V>`
Parameters:
  `map` - Map containing keys and entry processors to be applied to values.
  `args` - Additional arguments to pass to the `EntryProcessor`.
Returns:
  The map of `EntryProcessorResult`s of the processing per key, if any, defined by the `EntryProcessor` implementation. No mappings will be returned for `EntryProcessor`s that return a `null` value for a key.

#### invokeAllAsync

    public <T> IgniteFuture<Map<K,javax.cache.processor.EntryProcessorResult<T>>> invokeAllAsync(Map<? extends K,? extends javax.cache.processor.EntryProcessor<K,V,T>> map,
                                                                                                 Object... args)

Asynchronously version of the `IgniteCache.invokeAll(Map, Object...)` method.

Specified by:
  `invokeAllAsync` in interface `IgniteCache<K,V>`
Parameters:
  `map` - Map containing keys and entry processors to be applied to values.
  `args` - Additional arguments to pass to the `EntryProcessor`.
Returns:
  a Future representing pending completion of the operation. See more about future result at the `IgniteCache.invokeAll(Map, Object...)`.

#### getName

    public String getName()

Specified by:
  `getName` in interface `javax.cache.Cache<K,V>`

#### getCacheManager

    public CacheManager getCacheManager()

Specified by:
  `getCacheManager` in interface `javax.cache.Cache<K,V>`

#### setCacheManager

    public void setCacheManager(CacheManager cacheMgr)

Parameters:
  `cacheMgr` - Cache manager.

#### destroy

    public void destroy()

Completely deletes the cache with all its data from the system on all cluster nodes.

Specified by:
  `destroy` in interface `IgniteCache<K,V>`

#### destroyAsync

    public IgniteFuture<?> destroyAsync()

Specified by:
  `destroyAsync` in interface `IgniteCacheProxy<K,V>`
Returns:
  Future that contains cache destroy operation.

#### close

    public void close()

Closes this cache instance.

For local cache equivalent to `IgniteCache.destroy()`. For distributed caches, if called on clients, stops client cache, if called on a server node, just closes this cache instance and does not destroy cache data.

After cache instance is closed another `IgniteCache` instance for the same cache can be created using `Ignite.cache(String)` method.

Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `javax.cache.Cache<K,V>`
Specified by:
  `close` in interface `IgniteCache<K,V>`

#### closeAsync

    public IgniteFuture<?> closeAsync()

Specified by:
  `closeAsync` in interface `IgniteCacheProxy<K,V>`
Returns:
  Future that contains cache close operation.

#### isClosed

    public boolean isClosed()

Specified by:
  `isClosed` in interface `javax.cache.Cache<K,V>`

#### unwrap

    public <T> T unwrap(Class<T> clazz)

Specified by:
  `unwrap` in interface `javax.cache.Cache<K,V>`

#### registerCacheEntryListener

    public void registerCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> lsnrCfg)

Specified by:
  `registerCacheEntryListener` in interface `javax.cache.Cache<K,V>`

#### deregisterCacheEntryListener

    public void deregisterCacheEntryListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> lsnrCfg)

Specified by:
  `deregisterCacheEntryListener` in interface `javax.cache.Cache<K,V>`

#### iterator

    public Iterator<javax.cache.Cache.Entry<K,V>> iterator()

Specified by:
  `iterator` in interface `Iterable<javax.cache.Cache.Entry<K,V>>`
Specified by:
  `iterator` in interface `javax.cache.Cache<K,V>`

#### createAsyncInstance

    protected IgniteCache<K,V> createAsyncInstance()

Creates component with asynchronous mode enabled.

Overrides:
  `createAsyncInstance` in class `AsyncSupportAdapter<IgniteCache<K,V>>`
Returns:
  Component with asynchronous mode enabled.

#### keepBinary

    public <K1,V1> IgniteCache<K1,V1> keepBinary()

Creates projection that will operate with binary objects.

Projection returned by this method will force cache not to deserialize binary objects, so keys and values will be returned from cache API methods without changes. Therefore, signature of the projection can contain only following types:

- `BinaryObject` for binary classes
- All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)
- Arrays of primitives (byte[], int[], ...)
- `String` and array of `String`s
- `UUID` and array of `UUID`s
- `Date` and array of `Date`s
- `Timestamp` and array of `Timestamp`s
- Enums and array of enums
- Maps, collections and array of objects (but objects inside them will still be converted if they are binary)

For example, if you use `Integer` as a key and `Value` class as a value (which will be stored in binary format), you should acquire following projection to avoid deserialization:

     IgniteInternalCache<Integer, GridBinaryObject> prj = cache.keepBinary();

     // Value is not deserialized and returned in binary format.
     GridBinaryObject po = prj.get(1);

Note that this method makes sense only if cache is working in binary mode (`CacheConfiguration#isBinaryEnabled()` returns `true`. If not, this method is no-op and will return current projection.

Specified by:
  `keepBinary` in interface `IgniteCacheProxy<K,V>`
Returns:
  Projection for binary objects.

#### withDataCenterId

    public IgniteCache<K,V> withDataCenterId(byte dataCenterId)

Specified by:
  `withDataCenterId` in interface `IgniteCacheProxy<K,V>`
Parameters:
  `dataCenterId` - Data center ID.
Returns:
  Projection for data center id.

#### skipStore

    public IgniteCache<K,V> skipStore()

Specified by:
  `skipStore` in interface `IgniteCacheProxy<K,V>`
Returns:
  Cache with skip store enabled.

#### withAllowAtomicOpsInTx

    public IgniteCache<K,V> withAllowAtomicOpsInTx()

By default atomic operations are allowed in transaction. To restrict transactions from operations with atomic caches you can set system property `IGNITE_ALLOW_ATOMIC_OPS_IN_TX` to `false`.

If you want to use atomic operations inside transactions in case they are restricted by system property, you should allow it before transaction start.

Specified by:
  `withAllowAtomicOpsInTx` in interface `IgniteCache<K,V>`
Specified by:
  `withAllowAtomicOpsInTx` in interface `IgniteCacheProxy<K,V>`
Returns:
  Cache with atomic operations allowed in transactions.

#### createFuture

    protected <R> IgniteFuture<R> createFuture(IgniteInternalFuture<R> fut)

Overrides:
  `createFuture` in class `AsyncSupportAdapter<IgniteCache<K,V>>`
Parameters:
  `fut` - Internal future.
Returns:
  Public API future.

#### internalProxy

    public GridCacheProxyImpl<K,V> internalProxy()

Specified by:
  `internalProxy` in interface `IgniteCacheProxy<K,V>`
Returns:
  Internal proxy.

#### isProxyClosed

    public boolean isProxyClosed()

Specified by:
  `isProxyClosed` in interface `IgniteCacheProxy<K,V>`
Returns:
  `True` if proxy was closed.

#### closeProxy

    public void closeProxy()

Closes this proxy instance.

Specified by:
  `closeProxy` in interface `IgniteCacheProxy<K,V>`

#### lostPartitions

    public Collection<Integer> lostPartitions()

Gets a collection of lost partition IDs.

Specified by:
  `lostPartitions` in interface `IgniteCache<K,V>`
Returns:
  Lost partitions.

#### enableStatistics

    public void enableStatistics(boolean enabled)

Sets statistics enabled flag cluster wide for this cache.

Specified by:
  `enableStatistics` in interface `IgniteCache<K,V>`
Parameters:
  `enabled` - Statistics enabled flag.

#### clearStatistics

    public void clearStatistics()

Clear cluster statistics for this cache.

Specified by:
  `clearStatistics` in interface `IgniteCache<K,V>`

#### preloadPartition

    public void preloadPartition(int part)

Efficiently preloads cache primary partition into page memory.

This is useful for fast iteration over cache partition data if persistence is enabled and the data is "cold".

Preload will reduce available amount of page memory for subsequent operations and may lead to earlier page replacement.

This method is irrelevant for in-memory caches. Calling this method on an in-memory cache will result in exception.

Specified by:
  `preloadPartition` in interface `IgniteCache<K,V>`
Parameters:
  `part` - Partition.

#### preloadPartitionAsync

    public IgniteFuture<Void> preloadPartitionAsync(int part)

Efficiently preloads cache partition into page memory.

This is useful for fast iteration over cache partition data if persistence is enabled and the data is "cold".

Preload will reduce available amount of page memory for subsequent operations and may lead to earlier page replacement.

This method is irrelevant for in-memory caches. Calling this method on an in-memory cache will result in exception.

Specified by:
  `preloadPartitionAsync` in interface `IgniteCache<K,V>`
Parameters:
  `part` - Partition.
Returns:
  A future representing pending completion of the partition preloading.

#### localPreloadPartition

    public boolean localPreloadPartition(int part)

Efficiently preloads cache partition into page memory if it exists on the local node.

This is useful for fast iteration over cache partition data if persistence is enabled and the data is "cold".

Preload will reduce available amount of page memory for subsequent operations and may lead to earlier page replacement.

This method is irrelevant for in-memory caches. Calling this method on an in-memory cache will result in exception.

Specified by:
  `localPreloadPartition` in interface `IgniteCache<K,V>`
Parameters:
  `part` - Partition.
Returns:
  `True` if partition was preloaded, `false` if it doesn't belong to local node.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### rebalance

    public IgniteFuture<Boolean> rebalance()

This cache node to re-balance its partitions. This method is usually used when `CacheConfiguration.getRebalanceDelay()` configuration parameter has non-zero value. When many nodes are started or stopped almost concurrently, it is more efficient to delay rebalancing until the node topology is stable to make sure that no redundant re-partitioning happens.

In case of`CacheMode.PARTITIONED` caches, for better efficiency user should usually make sure that new nodes get placed on the same place of consistent hash ring as the left nodes, and that nodes are restarted before `rebalanceDelay` expires. To place nodes on the same place in consistent hash ring, use `IgniteConfiguration.setConsistentId(Serializable)` to make sure that a node maps to the same hash ID if re-started.

See `CacheConfiguration.getRebalanceDelay()` for more information on how to configure rebalance re-partition delay.

Specified by:
  `rebalance` in interface `IgniteCache<K,V>`
Returns:
  Future that will be completed when rebalancing is finished. Future.get() returns `true` when rebalance was successfully finished.

#### indexReadyFuture

    public IgniteFuture<?> indexReadyFuture()

Returns future that will be completed when all indexes for this cache are ready to use.

Specified by:
  `indexReadyFuture` in interface `IgniteCache<K,V>`
Returns:
  Future.

#### checkRestart

    public void checkRestart()

Throws `IgniteCacheRestartingException` if proxy is restarting.

#### checkRestart

    public void checkRestart(boolean noWait)

Throws `IgniteCacheRestartingException` if proxy is restarting.

#### isRestarting

    public boolean isRestarting()

Returns:
  True if proxy is restarting, false in other case.

#### suspend

    public org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.RestartFuture suspend()

Suspend this cache proxy. To make cache proxy active again, it's needed to restart it.

#### registrateFutureRestart

    public void registrateFutureRestart(GridFutureAdapter<?> fut)

Parameters:
  `fut` - Finish restart future.

#### opportunisticRestart

    public void opportunisticRestart(IgniteInternalCache<K,V> cache)

If proxy is already being restarted, returns future to wait on, else restarts this cache proxy.

Parameters:
  `cache` - To use for restart proxy.

#### onRestarted

    public void onRestarted(GridCacheContext ctx,
                            IgniteInternalCache delegate)

Mark this proxy as restarted.

Parameters:
  `ctx` - New cache context.
  `delegate` - New delegate.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020