Main entry point for all Data Grid APIs. You can get a named cache by calling org.apache.ignite.Ignite#cache(String)
method.

Functionality

This API extends CacheProjection API which contains vast majority of cache functionality
and documentation. In addition to CacheProjection functionality this API provides:

Various 'loadCache(..)' methods to load cache either synchronously or asynchronously.
These methods don't specify any keys to load, and leave it to the underlying storage to load cache
data based on the optionally passed in arguments.

Method affinity() provides CacheAffinityFunction service for information on
data partitioning and mapping keys to grid nodes responsible for caching those keys.

Methods like 'tx{Un}Synchronize(..)' witch allow to get notifications for transaction state changes.
This feature is very useful when integrating cache transactions with some other in-house transactions.

configuration

txSynchronize

Registers transactions synchronizations for all transactions started by this cache.
Use it whenever you need to get notifications on transaction lifecycle and possibly change
its course. It is also particularly useful when integrating cache transactions
with some other in-house transactions.

swapIterator

Gets iterator over keys and values belonging to this cache swap space on local node. This
iterator is thread-safe, which means that cache (and therefore its swap space)
may be modified concurrently with iteration over swap.

offHeapIterator

Gets iterator over keys and values belonging to this cache off-heap memory on local node. This
iterator is thread-safe, which means that cache (and therefore its off-heap memory)
may be modified concurrently with iteration over off-heap. To achieve better performance
the keys and values deserialized on demand, whenever accessed.

randomEntry

Gets a random entry out of cache. In the worst cache scenario this method
has complexity of

O(S * N/64)

where N is the size of internal hash
table and S is the number of hash table buckets to sample, which is 5
by default. However, if the table is pretty dense, with density factor of N/64,
which is true for near fully populated caches, this method will generally perform significantly
faster with complexity of O(S) where S = 5.

Note that this method is not available on CacheProjection API since it is
impossible (or very hard) to deterministically return a number value when pre-filtering
and post-filtering is involved (e.g. projection level predicate filters).

Returns:

Random entry, or null if cache is empty.

forceRepartition

org.apache.ignite.internal.IgniteInternalFuture<?> forceRepartition()

Forces 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.