blob: 2fcc04c819e071423852cb1102b5355955b3c063 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface IDataStreamer&lt;TK, TV&gt;
| Apache Ignite.NET </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface IDataStreamer&lt;TK, TV&gt;
| Apache Ignite.NET ">
<meta name="generator" content="docfx 2.58.4.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="../">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<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">Search Results for <span></span></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></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.Datastream.IDataStreamer`2">
<h1 id="Apache_Ignite_Core_Datastream_IDataStreamer_2" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2" class="text-break">Interface IDataStreamer&lt;TK, TV&gt;
</h1>
<div class="markdown level0 summary"><p>Data streamer loads data efficiently into cache. Updates are buffered and mapped to primary nodes
to ensure minimal data movement and optimal resource utilization.
<p>
Note that streamer loads data to remote nodes in parallel, so cache updates can be reordered.
<p>
Also note that <code>IDataStreamer</code> is not the only way to load data into cache.
Alternatively you can use
<a class="xref" href="Apache.Ignite.Core.Cache.Store.ICacheStore-2.html#Apache_Ignite_Core_Cache_Store_ICacheStore_2_LoadCache_Action__0__1__System_Object___">LoadCache(Action&lt;TK, TV&gt;, Object[])</a>
method to load data from underlying data store. You can also use standard cache
<code>put</code> and <code>putAll</code> operations as well, but they most likely will not perform
as well as this class for loading data. And finally, data can be loaded from underlying
data store on demand, whenever it is accessed - for this no explicit data loading step
is needed.
<p>
<code>IDataStreamer</code> supports the following configuration properties:
<ul><li>PerNodeBufferSizeWhen entries are added to data streamer they are not sent to Ignite
right away and are buffered internally for better performance and network utilization.
This setting controls the size of internal per-node buffer before buffered data is sent to
remote node. Default value is 1024.</li><li>PerThreadBufferSizeWhen entries are added to data streamer they are not sent to Ignite
right away and are buffered internally on per thread basis for better performance and network utilization.
This setting controls the size of internal per-thread buffer before buffered data is sent to
remote node. Default value is 4096.</li><li>PerNodeParallelOperationsSometimes data may be added to the data streamer faster than it can be put
in cache. In this case, new buffered load messages are sent to remote nodes before
responses from previous ones are received. This could cause unlimited heap memory
utilization growth on local and remote nodes. To control memory utilization, this
setting limits maximum allowed number of parallel buffered load messages that are
being processed on remote nodes. If this number is exceeded, then data streamer add/remove
methods will block to control memory utilization. Default value is 16.</li><li>AutoFlushFrequencyAutomatic flush frequency in milliseconds. Essentially, this is the time
after which the streamer will make an attempt to submit all data added so far to remote
nodes. Note that there is no guarantee that data will be delivered after this concrete
attempt (e.g., it can fail when topology is changing), but it won&apos;t be lost anyway.
Disabled by default (default value is <code>0</code>).</li><li>IsolatedDefines if data streamer will assume that there are no other concurrent
updates and allow data streamer choose most optimal concurrent implementation. Default value
is <code>false</code>.</li></ul>
<p>
All members are thread-safe and may be used concurrently from multiple threads.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="Apache.Ignite.Core.Datastream.html">Apache.Ignite.Core.Datastream</a></h6>
<h6><strong>Assembly</strong>: Apache.Ignite.Core.dll</h6>
<h5 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface IDataStreamer&lt;TK, TV&gt; : IDisposable</code></pre>
</div>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">TK</span></td>
<td></td>
</tr>
<tr>
<td><span class="parametername">TV</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AllowOverwrite_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AllowOverwrite*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AllowOverwrite" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AllowOverwrite">AllowOverwrite</h4>
<div class="markdown level1 summary"><p>Gets or sets a value indicating whether existing values can be overwritten by the data streamer.
Performance is better when this flag is false.
<p>
NOTE: When false, cache updates won&apos;t be propagated to cache store
(even if <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_SkipStore">SkipStore</a> is false).
<p>
Default is <code>false</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool AllowOverwrite { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushFrequency_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AutoFlushFrequency*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushFrequency" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AutoFlushFrequency">AutoFlushFrequency</h4>
<div class="markdown level1 summary"><p>Gets or sets the automatic flush frequency, in milliseconds.
Data streamer buffers the data for performance reasons.
The buffer is flushed in the following cases:
<ul>
<li>Buffer is full.</li>
<li><a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush">Flush()</a> or <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_TryFlush">TryFlush()</a> is called.</li>
<li>Periodically when <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushInterval">AutoFlushInterval</a> is set.</li>
</ul>
<p>
If set to <code>0</code>, automatic flush is disabled.
<p>
Default is <code>0</code> (disabled).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">long AutoFlushFrequency { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int64</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushInterval_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AutoFlushInterval*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushInterval" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AutoFlushInterval">AutoFlushInterval</h4>
<div class="markdown level1 summary"><p>Gets or sets the automatic flush interval. Data streamer buffers the data for performance reasons.
The buffer is flushed in the following cases:
<ul>
<li>Buffer is full.</li>
<li><a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush">Flush()</a> or <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_TryFlush">TryFlush()</a> is called.</li>
<li>Periodically when <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushInterval">AutoFlushInterval</a> is set.</li>
</ul>
<p>
When set to <see cref="!:TimeSpan.Zero"></see>, automatic flush is disabled.
<p>
Default is <see cref="!:TimeSpan.Zero"></see> (disabled).</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">TimeSpan AutoFlushInterval { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TimeSpan</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_CacheName_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.CacheName*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_CacheName" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.CacheName">CacheName</h4>
<div class="markdown level1 summary"><p>Name of the cache to load data to.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">string CacheName { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerNodeBufferSize_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerNodeBufferSize*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerNodeBufferSize" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerNodeBufferSize">PerNodeBufferSize</h4>
<div class="markdown level1 summary"><p>Size of per node key-value pairs buffer.
<p>
Setter must be called before any add/remove operation.
<p>
Default is <a class="xref" href="Apache.Ignite.Core.Datastream.DataStreamerDefaults.html#Apache_Ignite_Core_Datastream_DataStreamerDefaults_DefaultPerNodeBufferSize">DefaultPerNodeBufferSize</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int PerNodeBufferSize { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerNodeParallelOperations_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerNodeParallelOperations*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerNodeParallelOperations" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerNodeParallelOperations">PerNodeParallelOperations</h4>
<div class="markdown level1 summary"><p>Maximum number of parallel load operations for a single node.
<p>
Setter must be called before any add/remove operation.
<p>
Default is 0, which means Ignite calculates this automatically as
<a class="xref" href="Apache.Ignite.Core.IgniteConfiguration.html#Apache_Ignite_Core_IgniteConfiguration_DataStreamerThreadPoolSize">DataStreamerThreadPoolSize</a> *
<a class="xref" href="Apache.Ignite.Core.Datastream.DataStreamerDefaults.html#Apache_Ignite_Core_Datastream_DataStreamerDefaults_DefaultParallelOperationsMultiplier">DefaultParallelOperationsMultiplier</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int PerNodeParallelOperations { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerThreadBufferSize_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerThreadBufferSize*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_PerThreadBufferSize" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.PerThreadBufferSize">PerThreadBufferSize</h4>
<div class="markdown level1 summary"><p>Size of per thread key-value pairs buffer.
<p>
Setter must be called before any add/remove operation.
<p>
Default is <a class="xref" href="Apache.Ignite.Core.Datastream.DataStreamerDefaults.html#Apache_Ignite_Core_Datastream_DataStreamerDefaults_DefaultPerThreadBufferSize">DefaultPerThreadBufferSize</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int PerThreadBufferSize { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Receiver_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Receiver*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Receiver" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Receiver">Receiver</h4>
<div class="markdown level1 summary"><p>Gets or sets custom stream receiver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IStreamReceiver&lt;TK, TV&gt; Receiver { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Apache.Ignite.Core.Datastream.IStreamReceiver-2.html">IStreamReceiver</a>&lt;TK, TV&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_SkipStore_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.SkipStore*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_SkipStore" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.SkipStore">SkipStore</h4>
<div class="markdown level1 summary"><p>Flag indicating that write-through behavior should be disabled for data loading.
<p>
<a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_AllowOverwrite">AllowOverwrite</a> must be true for write-through to work.
<p>
Default is <code>false</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">bool SkipStore { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Task_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Task*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Task" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Task">Task</h4>
<div class="markdown level1 summary"><p>Gets the task for this loading process. This task completes whenever method
<a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Close_System_Boolean_">Close(Boolean)</a> completes.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task Task { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Timeout_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Timeout*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Timeout" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Timeout">Timeout</h4>
<div class="markdown level1 summary"><p>Gets or sets the timeout. Negative values mean no timeout.
Default is <a class="xref" href="Apache.Ignite.Core.Datastream.DataStreamerDefaults.html#Apache_Ignite_Core_Datastream_DataStreamerDefaults_DefaultTimeout">DefaultTimeout</a>.
<p>
Timeout is used in the following cases:
<li>Any data addition method can be blocked when all per node parallel operations are exhausted.
The timeout defines the max time you will be blocked waiting for a permit to add a chunk of data
into the streamer;</li>
<li>Total timeout time for <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush">Flush()</a> operation;</li>
<li>Total timeout time for <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Close_System_Boolean_">Close(Boolean)</a> operation.</li></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">TimeSpan Timeout { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TimeSpan</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add__0__1_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add(`0,`1)">Add(TK, TV)</h4>
<div class="markdown level1 summary"><p>Adds single key-value pair for loading. Passing <code>null</code> as value will be
interpreted as removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Add(TK key, TV val)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TK</span></td>
<td><span class="parametername">key</span></td>
<td><p>Key.</p>
</td>
</tr>
<tr>
<td><span class="xref">TV</span></td>
<td><span class="parametername">val</span></td>
<td><p>Value.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add_ICollection_KeyValuePair__0__1___" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add(ICollection{KeyValuePair{`0,`1}})">Add(ICollection&lt;KeyValuePair&lt;TK, TV&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Adds collection of key-value pairs for loading.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Add(ICollection&lt;KeyValuePair&lt;TK, TV&gt;&gt; entries)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">ICollection</span>&lt;<span class="xref">KeyValuePair</span>&lt;TK, TV&gt;&gt;</td>
<td><span class="parametername">entries</span></td>
<td><p>Entries.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Add_KeyValuePair__0__1__" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Add(KeyValuePair{`0,`1})">Add(KeyValuePair&lt;TK, TV&gt;)</h4>
<div class="markdown level1 summary"><p>Adds single key-value pair for loading. Passing <code>null</code> as pair&apos;s value will
be interpreted as removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Add(KeyValuePair&lt;TK, TV&gt; pair)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">KeyValuePair</span>&lt;TK, TV&gt;</td>
<td><span class="parametername">pair</span></td>
<td><p>Key-value pair.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData__0__1_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData(`0,`1)">AddData(TK, TV)</h4>
<div class="markdown level1 summary"><p>Adds single key-value pair for loading. Passing <code>null</code> as value will be
interpreted as removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task AddData(TK key, TV val)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TK</span></td>
<td><span class="parametername">key</span></td>
<td><p>Key.</p>
</td>
</tr>
<tr>
<td><span class="xref">TV</span></td>
<td><span class="parametername">val</span></td>
<td><p>Value.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td><p>Task for this operation.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData_ICollection_KeyValuePair__0__1___" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData(ICollection{KeyValuePair{`0,`1}})">AddData(ICollection&lt;KeyValuePair&lt;TK, TV&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Adds collection of key-value pairs for loading.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task AddData(ICollection&lt;KeyValuePair&lt;TK, TV&gt;&gt; entries)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">ICollection</span>&lt;<span class="xref">KeyValuePair</span>&lt;TK, TV&gt;&gt;</td>
<td><span class="parametername">entries</span></td>
<td><p>Entries.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td><p>Task for this operation.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_AddData_KeyValuePair__0__1__" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.AddData(KeyValuePair{`0,`1})">AddData(KeyValuePair&lt;TK, TV&gt;)</h4>
<div class="markdown level1 summary"><p>Adds single key-value pair for loading. Passing <code>null</code> as pair&apos;s value will
be interpreted as removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task AddData(KeyValuePair&lt;TK, TV&gt; pair)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">KeyValuePair</span>&lt;TK, TV&gt;</td>
<td><span class="parametername">pair</span></td>
<td><p>Key-value pair.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td><p>Task for this operation.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Close_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Close*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Close_System_Boolean_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Close(System.Boolean)">Close(Boolean)</h4>
<div class="markdown level1 summary"><p>Closes this streamer, optionally loading any remaining data into the cache.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Close(bool cancel)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">cancel</span></td>
<td><p>Whether to cancel ongoing loading operations. When set to <code>true</code>,
there is no guarantee which part of remaining data will be actually loaded into the cache.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Flush*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Flush">Flush()</h4>
<div class="markdown level1 summary"><p>Loads any remaining buffered data, but doesn&apos;t close the streamer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Flush()</code></pre>
</div>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_FlushAsync_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.FlushAsync*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_FlushAsync" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.FlushAsync">FlushAsync()</h4>
<div class="markdown level1 summary"><p>Loads any remaining buffered data, but doesn&apos;t close the streamer.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task FlushAsync()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_GetCurrentBatchTask_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.GetCurrentBatchTask*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_GetCurrentBatchTask" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.GetCurrentBatchTask">GetCurrentBatchTask()</h4>
<div class="markdown level1 summary"><p>Gets the task for the current batch. This task completes when current and all previous batches are flushed,
either explicitly with <a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush">Flush()</a>, or automatically when the buffer is full or
<a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_AutoFlushFrequency">AutoFlushFrequency</a> is set.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task GetCurrentBatchTask()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td></td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Remove_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Remove*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_Remove__0_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.Remove(`0)">Remove(TK)</h4>
<div class="markdown level1 summary"><p>Adds key for removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void Remove(TK key)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TK</span></td>
<td><span class="parametername">key</span></td>
<td><p>Key.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_RemoveData_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.RemoveData*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_RemoveData__0_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.RemoveData(`0)">RemoveData(TK)</h4>
<div class="markdown level1 summary"><p>Adds key for removal.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task RemoveData(TK key)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">TK</span></td>
<td><span class="parametername">key</span></td>
<td><p>Key.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">Task</span></td>
<td><p>Task for this operation.</p>
</td>
</tr>
</tbody>
</table>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_TryFlush_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.TryFlush*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_TryFlush" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.TryFlush">TryFlush()</h4>
<div class="markdown level1 summary"><p>Makes an attempt to load remaining data. This method is mostly similar to
<a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html#Apache_Ignite_Core_Datastream_IDataStreamer_2_Flush">Flush()</a> with the difference that it won&apos;t wait and
will exit immediately.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void TryFlush()</code></pre>
</div>
<a id="Apache_Ignite_Core_Datastream_IDataStreamer_2_WithKeepBinary_" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.WithKeepBinary*"></a>
<h4 id="Apache_Ignite_Core_Datastream_IDataStreamer_2_WithKeepBinary__2" data-uid="Apache.Ignite.Core.Datastream.IDataStreamer`2.WithKeepBinary``2">WithKeepBinary&lt;TK1, TV1&gt;()</h4>
<div class="markdown level1 summary"><p>Gets streamer instance with binary mode enabled, changing key and/or value types if necessary.
In binary mode stream receiver gets data in binary format.
You can only change key/value types when transitioning from non-binary to binary streamer;
Changing type of binary streamer is not allowed and will throw an <see cref="!:InvalidOperationException"></see></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IDataStreamer&lt;TK1, TV1&gt; WithKeepBinary&lt;TK1, TV1&gt;()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Apache.Ignite.Core.Datastream.IDataStreamer-2.html">IDataStreamer</a>&lt;TK1, TV1&gt;</td>
<td><p>Streamer instance with binary mode enabled.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">TK1</span></td>
<td><p>Key type in binary mode.</p>
</td>
</tr>
<tr>
<td><span class="parametername">TV1</span></td>
<td><p>Value type in binary mode.</p>
</td>
</tr>
</tbody>
</table>
</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">
<h5>In This Article</h5>
<div></div>
</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 - 2019 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>