Asynchronously stores given key-value pair in cache. If filters are provided, then entries will
be stored in cache only if they pass the filter. Note that filter check is atomic,
so value stored in cache is guaranteed to be consistent with the filters. If cache
previously contained value for the given key, then this value is returned. Otherwise,
in case of
CacheMode#REPLICATED caches, the value will be loaded from swap
and, if it's not there, and read-through is allowed, from the underlying
CacheStore storage. In case of
CacheMode#PARTITIONED 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 and read-through is allowed,
from the underlying persistent storage. If value has to be loaded from persistent
storage,
CacheStore#load(Transaction, Object)
method will be used.
If the returned value is not needed, method #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])
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
CacheStorevia CacheStore#put(Transaction, Object, Object)
method.
Transactions
This method is transactional and will enlist the entry into ongoing transaction
if there is one.