blob: bf1dc974f63249bf55fedc5940bce0d55706a6bc [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<link rel="canonical" href="https://ignite.apache.org/releases/2.5.0/dotnetdoc/api/Apache.Ignite.Core.Cache.html" />
<META NAME="ROBOTS" CONTENT="NOINDEX">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Namespace Apache.Ignite.Core.Cache
| Apache Ignite.NET </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Namespace Apache.Ignite.Core.Cache
| Apache Ignite.NET ">
<meta name="generator" content="docfx 2.24.0.0">
<link rel="shortcut icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
<meta property="docfx:rel" content="../">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body data-spy="scroll" data-target="#affix">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../images/logo_ignite_32_32.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items"></div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Apache.Ignite.Core.Cache">
<h1 id="Apache_Ignite_Core_Cache" data-uid="Apache.Ignite.Core.Cache" class="text-break">Namespace Apache.Ignite.Core.Cache
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CacheAtomicUpdateTimeoutException.html">CacheAtomicUpdateTimeoutException</a></h4>
<section><p>Indicates atomic operation timeout.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CacheEntryProcessorException.html">CacheEntryProcessorException</a></h4>
<section><p>An exception to indicate a problem occurred attempting to execute an
<a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryProcessor-4.html">ICacheEntryProcessor&lt;TK, TV, TArg, TRes&gt;</a> against an entry.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CacheException.html">CacheException</a></h4>
<section><p>Indicates an error during Cache operation.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CachePartialUpdateException.html">CachePartialUpdateException</a></h4>
<section><p>Exception thrown from non-transactional cache in case when update succeeded only partially.</p>
</section>
<h3 id="structs">Structs
</h3>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CacheResult-1.html">CacheResult&lt;T&gt;</a></h4>
<section><p>Represents a cache operation result with a success flag.</p>
</section>
<h3 id="interfaces">Interfaces
</h3>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICache-2.html">ICache&lt;TK, TV&gt;</a></h4>
<section><p>Main entry point for Ignite cache APIs. You can get a named cache by calling
<a class="xref" href="Apache.Ignite.Core.IIgnite.html#Apache_Ignite_Core_IIgnite_GetCache__2_System_String_">GetCache&lt;TK, TV&gt;(String)</a> method.
<p>
Cache API supports distributed transactions. All <code>Get(...)</code>, <code>Put(...)</code>, <code>Replace(...)</code>,
and <code>Remove(...)</code> operations are transactional and will participate in an ongoing transaction,
if any. Other methods like <code>Peek(...)</code> or various <code>Contains(...)</code> methods may
be transaction-aware, i.e. check in-transaction entries first, but will not affect the current
state of transaction. See <a class="xref" href="Apache.Ignite.Core.Transactions.ITransaction.html">ITransaction</a> documentation for more information
about transactions.
<p>
Neither <code>null</code> keys or values are allowed to be stored in cache. If a <code>null</code> value
happens to be in cache (e.g. after invalidation or remove), then cache will treat this case
as there is no value at all.
<p>
Note that cache is generic and you can only work with provided key and value types. If cache also
contains keys or values of other types, any attempt to retrieve them will result in
<span class="xref">System.InvalidCastException</span>. Use <a class="xref" href="Apache.Ignite.Core.Cache.ICache-2.html">ICache&lt;TK, TV&gt;</a> in order to work with entries
of arbitrary types.
<p>
All members are thread-safe and may be used concurrently from multiple threads.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheAffinity.html">ICacheAffinity</a></h4>
<section><p>Provides affinity information to detect which node is primary and which nodes are
backups for a partitioned cache. You can get an instance of this interface by calling
<a class="xref" href="Apache.Ignite.Core.IIgnite.html#Apache_Ignite_Core_IIgnite_GetAffinity_System_String_">GetAffinity(String)</a> method.
<p>
Mapping of a key to a node is a three-step operation. First step will get an affinity key for
given key using <code>CacheAffinityKeyMapper</code>. If mapper is not specified, the original key
will be used. Second step will map affinity key to partition using
<code>CacheAffinityFunction.partition(Object)</code> method. Third step will map obtained partition
to nodes for current grid topology version.
<p>
Interface provides various <code>mapKeysToNodes(...)</code> methods which provide node affinity mapping
for given keys. All <code>mapKeysToNodes(...)</code> methods are not transactional and will not enlist
keys into ongoing transaction.
<p>
All members are thread-safe and may be used concurrently from multiple threads.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntry-2.html">ICacheEntry&lt;TK, TV&gt;</a></h4>
<section><p>Cache entry interface.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryFilter-2.html">ICacheEntryFilter&lt;TK, TV&gt;</a></h4>
<section><p>Cache entry predicate.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryProcessor-4.html">ICacheEntryProcessor&lt;TK, TV, TArg, TRes&gt;</a></h4>
<section><p>An invocable function that allows applications to perform compound operations
on a cache entry atomically, according the defined consistency of a cache.
<p>
Any cache entry mutations will not take effect until after
the <a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryProcessor-4.html#Apache_Ignite_Core_Cache_ICacheEntryProcessor_4_Process_Apache_Ignite_Core_Cache_IMutableCacheEntry__0__1___2_">Process(IMutableCacheEntry&lt;TK, TV&gt;, TArg)</a> method has completedS execution.
<p>
If an exception is thrown by an entry processor, a Caching Implementation
must wrap any exception thrown wrapped in an <a class="xref" href="Apache.Ignite.Core.Cache.CacheEntryProcessorException.html">CacheEntryProcessorException</a>
If this occurs no mutations will be made to the cache entry.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryProcessorResult-2.html">ICacheEntryProcessorResult&lt;TK, T&gt;</a></h4>
<section><p>Represents a result of processing <a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntry-2.html">ICacheEntry&lt;TK, TV&gt;</a>
by <a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntryProcessor-4.html">ICacheEntryProcessor&lt;TK, TV, TArg, TRes&gt;</a>.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheLock.html">ICacheLock</a></h4>
<section><p>Cache locking interface.
<p>
All members are thread-safe and may be used concurrently from multiple threads.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.ICacheMetrics.html">ICacheMetrics</a></h4>
<section><p>Cache metrics used to obtain statistics on cache itself.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.IMemoryMetrics.html">IMemoryMetrics</a></h4>
<section><p>Memory usage metrics.
Obsolete, use <a class="xref" href="Apache.Ignite.Core.IDataRegionMetrics.html">IDataRegionMetrics</a>.</p>
</section>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.IMutableCacheEntry-2.html">IMutableCacheEntry&lt;TK, TV&gt;</a></h4>
<section><p>Mutable representation of <a class="xref" href="Apache.Ignite.Core.Cache.ICacheEntry-2.html">ICacheEntry&lt;TK, TV&gt;</a></p>
</section>
<h3 id="enums">Enums
</h3>
<h4><a class="xref" href="Apache.Ignite.Core.Cache.CachePeekMode.html">CachePeekMode</a></h4>
<section><p>Enumeration of all supported cache peek modes.</p>
</section>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
© 2015 - 2018 The Apache Software Foundation
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>