blob: 59afc4c2c3f078c0c00a38f982c07bb82cd33889 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<link rel="canonical" href="https://ignite.apache.org/releases/1.1.0/javadoc/org/apache/ignite/IgniteDataStreamer.html" />
<!-- Generated by javadoc (version 1.7.0_21) on Wed May 20 19:38:53 MSK 2015 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>IgniteDataStreamer (Ignite 1.1.0-incubating)</title>
<meta name="date" content="2015-05-20">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<link rel='shortcut icon' href='https://ignite.incubator.apache.org/favicon.ico'/>
<link type='text/css' rel='stylesheet' href='http://agorbatchev.typepad.com/pub/sh/3_0_83/styles/shCore.css'/>
<link type='text/css' rel='stylesheet' href='http://agorbatchev.typepad.com/pub/sh/3_0_83/styles/shThemeDefault.css'/>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shCore.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shLegacy.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushJava.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushPlain.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushJScript.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushBash.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushXml.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushScala.js'></script>
<script type='text/javascript' src='http://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushGroovy.js'></script>
<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>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IgniteDataStreamer (Ignite 1.1.0-incubating)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteDataStreamer.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteDeploymentException.html" title="class in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteDataStreamer.html" target="_top">Frames</a></li>
<li><a href="IgniteDataStreamer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.ignite</div>
<h2 title="Interface IgniteDataStreamer" class="title">Interface IgniteDataStreamer<span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span></h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IgniteDataStreamer<span class='angle_bracket'>&lt;</span>K,V<span class='angle_bracket'>&gt;</span></span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></pre>
<div class="block">Data streamer is responsible for streaming external data into cache. It achieves it by
properly buffering updates and properly mapping keys to nodes responsible for the data
to make sure that there is the least amount of data movement possible and optimal
network and memory utilization.
<p>
Note that streamer will stream data concurrently by multiple internal threads, so the
data may get to remote nodes in different order from which it was added to
the streamer.
<p>
Also note that <code>IgniteDataStreamer</code> is not the only way to add data into cache.
Alternatively you can use <a href="../../../org/apache/ignite/IgniteCache.html#loadCache(org.apache.ignite.lang.IgniteBiPredicate, java.lang.Object...)"><code>IgniteCache.loadCache(IgniteBiPredicate, Object...)</code></a>
method to add 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 adding data. And finally,
data can be added from underlying data store on demand, whenever it is accessed -
for this no explicit data adding step is needed.
<p>
<code>IgniteDataStreamer</code> supports the following configuration properties:
<ul>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeBufferSize(int)"><code>perNodeBufferSize(int)</code></a> - when entries are added to data streamer via
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(Object, Object)</code></a> method, they are not sent to in-memory data grid 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 is defined by <a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_PER_NODE_BUFFER_SIZE"><code>DFLT_PER_NODE_BUFFER_SIZE</code></a>
value.
</li>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeParallelOperations(int)"><code>perNodeParallelOperations(int)</code></a> - sometimes data may be added
to the data streamer via <a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(Object, Object)</code></a> method faster than it can
be put in cache. In this case, new buffered stream 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 stream messages that
are being processed on remote nodes. If this number is exceeded, then
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(Object, Object)</code></a> method will block to control memory utilization.
Default is defined by <a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_MAX_PARALLEL_OPS"><code>DFLT_MAX_PARALLEL_OPS</code></a> value.
</li>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#autoFlushFrequency(long)"><code>autoFlushFrequency(long)</code></a> - automatic 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't be lost anyway. Disabled by default (default value is <code>0</code>).
</li>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)"><code>allowOverwrite(boolean)</code></a> - Sets flag enabling overwriting existing values in cache.
Data streamer will perform better if this flag is disabled, which is the default setting.
</li>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#receiver(org.apache.ignite.stream.StreamReceiver)"><code>receiver(StreamReceiver)</code></a> - defines how cache will be updated with added entries.
It allows to provide user-defined custom logic to update the cache in the most effective and flexible way.
</li>
<li>
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#deployClass(java.lang.Class)"><code>deployClass(Class)</code></a> - optional deploy class for peer deployment. All classes
streamed by a data streamer must be class-loadable from the same class-loader.
Ignite will make the best effort to detect the most suitable class-loader
for data loading. However, in complex cases, where compound or deeply nested
class-loaders are used, it is best to specify a deploy class which can be any
class loaded by the class-loader for given data.
</li>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_MAX_PARALLEL_OPS">DFLT_MAX_PARALLEL_OPS</a></strong></code>
<div class="block">Default max concurrent put operations count.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_PER_NODE_BUFFER_SIZE">DFLT_PER_NODE_BUFFER_SIZE</a></strong></code>
<div class="block">Default per node buffer size.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(java.util.Collection)">addData</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><span class='angle_bracket'>&lt;</span>? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span><span class='angle_bracket'>&gt;</span>&nbsp;entries)</code>
<div class="block">Adds data for streaming on remote node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)">addData</a></strong>(<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>&nbsp;key,
<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a>&nbsp;val)</code>
<div class="block">Adds data for streaming on remote node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(java.util.Map.Entry)">addData</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;entry)</code>
<div class="block">Adds data for streaming on remote node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(java.util.Map)">addData</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;entries)</code>
<div class="block">Adds data for streaming on remote node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()">allowOverwrite</a></strong>()</code>
<div class="block">Gets flag enabling overwriting existing values in cache.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)">allowOverwrite</a></strong>(boolean&nbsp;allowOverwrite)</code>
<div class="block">Sets flag enabling overwriting existing values in cache.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#autoFlushFrequency()">autoFlushFrequency</a></strong>()</code>
<div class="block">Gets automatic flush frequency.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#autoFlushFrequency(long)">autoFlushFrequency</a></strong>(long&nbsp;autoFlushFreq)</code>
<div class="block">Sets automatic flush frequency.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#cacheName()">cacheName</a></strong>()</code>
<div class="block">Name of cache to stream data to.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#close()">close</a></strong>()</code>
<div class="block">Closes data streamer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)">close</a></strong>(boolean&nbsp;cancel)</code>
<div class="block">Streams any remaining data and closes this streamer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#deployClass(java.lang.Class)">deployClass</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;depCls)</code>
<div class="block">Optional deploy class for peer deployment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#flush()">flush</a></strong>()</code>
<div class="block">Streams any remaining data, but doesn't close the streamer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#future()">future</a></strong>()</code>
<div class="block">Gets future for this streaming process.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeBufferSize()">perNodeBufferSize</a></strong>()</code>
<div class="block">Gets size of per node key-value pairs buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeBufferSize(int)">perNodeBufferSize</a></strong>(int&nbsp;bufSize)</code>
<div class="block">Sets size of per node key-value pairs buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeParallelOperations()">perNodeParallelOperations</a></strong>()</code>
<div class="block">Gets maximum number of parallel stream operations for a single node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#perNodeParallelOperations(int)">perNodeParallelOperations</a></strong>(int&nbsp;parallelOps)</code>
<div class="block">Sets maximum number of parallel stream operations for a single node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#receiver(org.apache.ignite.stream.StreamReceiver)">receiver</a></strong>(<a href="../../../org/apache/ignite/stream/StreamReceiver.html" title="interface in org.apache.ignite.stream">StreamReceiver</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;rcvr)</code>
<div class="block">Sets custom stream receiver to this data streamer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#removeData(K)">removeData</a></strong>(<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>&nbsp;key)</code>
<div class="block">Adds key for removal on remote node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#skipStore()">skipStore</a></strong>()</code>
<div class="block">Gets flag indicating that write-through behavior should be disabled for data streaming.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#skipStore(boolean)">skipStore</a></strong>(boolean&nbsp;skipStore)</code>
<div class="block">Sets flag indicating that write-through behavior should be disabled for data streaming.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteDataStreamer.html#tryFlush()">tryFlush</a></strong>()</code>
<div class="block">Makes an attempt to stream remaining data.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DFLT_MAX_PARALLEL_OPS">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DFLT_MAX_PARALLEL_OPS</h4>
<pre>static final&nbsp;int DFLT_MAX_PARALLEL_OPS</pre>
<div class="block">Default max concurrent put operations count.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.apache.ignite.IgniteDataStreamer.DFLT_MAX_PARALLEL_OPS">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DFLT_PER_NODE_BUFFER_SIZE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DFLT_PER_NODE_BUFFER_SIZE</h4>
<pre>static final&nbsp;int DFLT_PER_NODE_BUFFER_SIZE</pre>
<div class="block">Default per node buffer size.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.apache.ignite.IgniteDataStreamer.DFLT_PER_NODE_BUFFER_SIZE">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="cacheName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheName</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;cacheName()</pre>
<div class="block">Name of cache to stream data to.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Cache name or <code>null</code> for default cache.</dd></dl>
</li>
</ul>
<a name="allowOverwrite()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allowOverwrite</h4>
<pre>boolean&nbsp;allowOverwrite()</pre>
<div class="block">Gets flag enabling overwriting existing values in cache.
Data streamer will perform better if this flag is disabled.
<p>
This flag is disabled by default (default is <code>false</code>).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>True</code> if overwriting is allowed, <code>false</code> otherwise..</dd></dl>
</li>
</ul>
<a name="allowOverwrite(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allowOverwrite</h4>
<pre>void&nbsp;allowOverwrite(boolean&nbsp;allowOverwrite)
throws javax.cache.CacheException</pre>
<div class="block">Sets flag enabling overwriting existing values in cache.
Data streamer will perform better if this flag is disabled.
<p>
Should not be used when custom cache receiver set using <a href="../../../org/apache/ignite/IgniteDataStreamer.html#receiver(org.apache.ignite.stream.StreamReceiver)"><code>receiver(StreamReceiver)</code></a> method.
<p>
Note that when this flag is <code>false</code>, updates will not be propagated to the cache store
(i.e. <a href="../../../org/apache/ignite/IgniteDataStreamer.html#skipStore()"><code>skipStore()</code></a> flag will be set to <code>true</code> implicitly).
<p>
This flag is disabled by default (default is <code>false</code>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>allowOverwrite</code> - Flag value.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed.</dd></dl>
</li>
</ul>
<a name="skipStore()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipStore</h4>
<pre>boolean&nbsp;skipStore()</pre>
<div class="block">Gets flag indicating that write-through behavior should be disabled for data streaming.
Default is <code>false</code>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Skip store flag.</dd></dl>
</li>
</ul>
<a name="skipStore(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skipStore</h4>
<pre>void&nbsp;skipStore(boolean&nbsp;skipStore)</pre>
<div class="block">Sets flag indicating that write-through behavior should be disabled for data streaming.
Default is <code>false</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>skipStore</code> - Skip store flag.</dd></dl>
</li>
</ul>
<a name="perNodeBufferSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>perNodeBufferSize</h4>
<pre>int&nbsp;perNodeBufferSize()</pre>
<div class="block">Gets size of per node key-value pairs buffer.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Per node buffer size.</dd></dl>
</li>
</ul>
<a name="perNodeBufferSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>perNodeBufferSize</h4>
<pre>void&nbsp;perNodeBufferSize(int&nbsp;bufSize)</pre>
<div class="block">Sets size of per node key-value pairs buffer.
<p>
This method should be called prior to <a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(Object, Object)</code></a> call.
<p>
If not provided, default value is <a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_PER_NODE_BUFFER_SIZE"><code>DFLT_PER_NODE_BUFFER_SIZE</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bufSize</code> - Per node buffer size.</dd></dl>
</li>
</ul>
<a name="perNodeParallelOperations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>perNodeParallelOperations</h4>
<pre>int&nbsp;perNodeParallelOperations()</pre>
<div class="block">Gets maximum number of parallel stream operations for a single node.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Maximum number of parallel stream operations for a single node.</dd></dl>
</li>
</ul>
<a name="perNodeParallelOperations(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>perNodeParallelOperations</h4>
<pre>void&nbsp;perNodeParallelOperations(int&nbsp;parallelOps)</pre>
<div class="block">Sets maximum number of parallel stream operations for a single node.
<p>
This method should be called prior to <a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(Object, Object)</code></a> call.
<p>
If not provided, default value is <a href="../../../org/apache/ignite/IgniteDataStreamer.html#DFLT_MAX_PARALLEL_OPS"><code>DFLT_MAX_PARALLEL_OPS</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parallelOps</code> - Maximum number of parallel stream operations for a single node.</dd></dl>
</li>
</ul>
<a name="autoFlushFrequency()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoFlushFrequency</h4>
<pre>long&nbsp;autoFlushFrequency()</pre>
<div class="block">Gets automatic flush frequency. 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't be lost anyway.
<p>
If set to <code>0</code>, automatic flush is disabled.
<p>
Automatic flush is disabled by default (default value is <code>0</code>).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Flush frequency or <code>0</code> if automatic flush is disabled.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#flush()"><code>flush()</code></a></dd></dl>
</li>
</ul>
<a name="autoFlushFrequency(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autoFlushFrequency</h4>
<pre>void&nbsp;autoFlushFrequency(long&nbsp;autoFlushFreq)</pre>
<div class="block">Sets automatic flush frequency. 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't be lost anyway.
<p>
If set to <code>0</code>, automatic flush is disabled.
<p>
Automatic flush is disabled by default (default value is <code>0</code>).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>autoFlushFreq</code> - Flush frequency or <code>0</code> to disable automatic flush.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#flush()"><code>flush()</code></a></dd></dl>
</li>
</ul>
<a name="future()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>future</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;future()</pre>
<div class="block">Gets future for this streaming process. This future completes whenever method
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> completes. By attaching listeners to this future
it is possible to get asynchronous notifications for completion of this
streaming process.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Future for this streaming process.</dd></dl>
</li>
</ul>
<a name="deployClass(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deployClass</h4>
<pre>void&nbsp;deployClass(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;depCls)</pre>
<div class="block">Optional deploy class for peer deployment. All classes added by a data streamer
must be class-loadable from the same class-loader. Ignite will make the best
effort to detect the most suitable class-loader for data loading. However,
in complex cases, where compound or deeply nested class-loaders are used,
it is best to specify a deploy class which can be any class loaded by
the class-loader for given data.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>depCls</code> - Any class loaded by the class-loader for given data.</dd></dl>
</li>
</ul>
<a name="receiver(org.apache.ignite.stream.StreamReceiver)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>receiver</h4>
<pre>void&nbsp;receiver(<a href="../../../org/apache/ignite/stream/StreamReceiver.html" title="interface in org.apache.ignite.stream">StreamReceiver</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;rcvr)</pre>
<div class="block">Sets custom stream receiver to this data streamer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rcvr</code> - Stream receiver.</dd></dl>
</li>
</ul>
<a name="removeData(java.lang.Object)">
<!-- -->
</a><a name="removeData(K)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeData</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;removeData(<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>&nbsp;key)
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Adds key for removal on remote node. Equivalent to <a href="../../../org/apache/ignite/IgniteDataStreamer.html#addData(K, V)"><code>addData(key, null)</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - Key.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Future fo this operation.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd></dl>
</li>
</ul>
<a name="addData(java.lang.Object,java.lang.Object)">
<!-- -->
</a><a name="addData(K, V)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addData</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;addData(<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>&nbsp;key,
@Nullable
<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a>&nbsp;val)
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Adds data for streaming on remote node. This method can be called from multiple
threads in parallel to speed up streaming if needed.
<p>
Note that streamer will stream data concurrently by multiple internal threads, so the
data may get to remote nodes in different order from which it was added to
the streamer.
<p>
Note: if <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a> set to <code>false</code> (by default)
then data streamer will not overwrite existing cache entries for better performance
(to change, set <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)"><code>allowOverwrite(boolean)</code></a> to <code>true</code>)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - Key.</dd><dd><code>val</code> - Value or <code>null</code> if respective entry must be removed from cache.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Future fo this operation.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a></dd></dl>
</li>
</ul>
<a name="addData(java.util.Map.Entry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addData</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;addData(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;entry)
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Adds data for streaming on remote node. This method can be called from multiple
threads in parallel to speed up streaming if needed.
<p>
Note that streamer will stream data concurrently by multiple internal threads, so the
data may get to remote nodes in different order from which it was added to
the streamer.
<p>
Note: if <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a> set to <code>false</code> (by default)
then data streamer will not overwrite existing cache entries for better performance
(to change, set <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)"><code>allowOverwrite(boolean)</code></a> to <code>true</code>)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entry</code> - Entry.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Future fo this operation.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a></dd></dl>
</li>
</ul>
<a name="addData(java.util.Collection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addData</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;addData(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a><span class='angle_bracket'>&lt;</span>? extends <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span><span class='angle_bracket'>&gt;</span>&nbsp;entries)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Adds data for streaming on remote node. This method can be called from multiple
threads in parallel to speed up streaming if needed.
<p>
Note that streamer will stream data concurrently by multiple internal threads, so the
data may get to remote nodes in different order from which it was added to
the streamer.
<p>
Note: if <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a> set to <code>false</code> (by default)
then data streamer will not overwrite existing cache entries for better performance
(to change, set <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)"><code>allowOverwrite(boolean)</code></a> to <code>true</code>)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entries</code> - Collection of entries to be streamed.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Future for this stream operation.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a></dd></dl>
</li>
</ul>
<a name="addData(java.util.Map)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addData</h4>
<pre><a href="../../../org/apache/ignite/lang/IgniteFuture.html" title="interface in org.apache.ignite.lang">IgniteFuture</a><span class='angle_bracket'>&lt;</span>?<span class='angle_bracket'>&gt;</span>&nbsp;addData(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'>&lt;</span><a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">K</a>,<a href="../../../org/apache/ignite/IgniteDataStreamer.html" title="type parameter in IgniteDataStreamer">V</a><span class='angle_bracket'>&gt;</span>&nbsp;entries)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Adds data for streaming on remote node. This method can be called from multiple
threads in parallel to speed up streaming if needed.
<p>
Note that streamer will stream data concurrently by multiple internal threads, so the
data may get to remote nodes in different order from which it was added to
the streamer.
<p>
Note: if <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a> set to <code>false</code> (by default)
then data streamer will not overwrite existing cache entries for better performance
(to change, set <a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite(boolean)"><code>allowOverwrite(boolean)</code></a> to <code>true</code>)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entries</code> - Map to be streamed.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Future for this stream operation.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#allowOverwrite()"><code>allowOverwrite()</code></a></dd></dl>
</li>
</ul>
<a name="flush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre>void&nbsp;flush()
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Streams any remaining data, but doesn't close the streamer. Data can be still added after
flush is finished. This method blocks and doesn't allow to add any data until all data
is streamed.
<p>
If another thread is already performing flush, this method will block, wait for
another thread to complete flush and exit. If you don't want to wait in this case,
use <a href="../../../org/apache/ignite/IgniteDataStreamer.html#tryFlush()"><code>tryFlush()</code></a> method.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#tryFlush()"><code>tryFlush()</code></a></dd></dl>
</li>
</ul>
<a name="tryFlush()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>tryFlush</h4>
<pre>void&nbsp;tryFlush()
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a>,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></pre>
<div class="block">Makes an attempt to stream remaining data. This method is mostly similar to <a href="../../../org/apache/ignite/IgniteDataStreamer.html#flush()"><code>flush()</code></a>,
with the difference that it won't wait and will exit immediately.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If grid has been concurrently stopped or
<a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(boolean)</code></a> has already been called on streamer.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../org/apache/ignite/IgniteDataStreamer.html#flush()"><code>flush()</code></a></dd></dl>
</li>
</ul>
<a name="close(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close(boolean&nbsp;cancel)
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></pre>
<div class="block">Streams any remaining data and closes this streamer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cancel</code> - <code>True</code> to cancel ongoing streaming operations.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to map key to node.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd></dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()
throws javax.cache.CacheException,
<a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></pre>
<div class="block">Closes data streamer. This method is identical to calling <a href="../../../org/apache/ignite/IgniteDataStreamer.html#close(boolean)"><code>close(false)</code></a> method.
<p>
The method is invoked automatically on objects managed by the
<code>try-with-resources</code> statement.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>javax.cache.CacheException</code> - If failed to close data streamer.</dd>
<dd><code><a href="../../../org/apache/ignite/IgniteInterruptedException.html" title="class in org.apache.ignite">IgniteInterruptedException</a></code> - If thread has been interrupted.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteDataStreamer.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteCountDownLatch.html" title="interface in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteDeploymentException.html" title="class in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteDataStreamer.html" target="_top">Frames</a></li>
<li><a href="IgniteDataStreamer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://incubator.apache.org/projects/ignite.html"><nobr>2015 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>1.1.0-incubating</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; May 20 2015 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
<!--FOOTER--><script type='text/javascript'>SyntaxHighlighter.all();dp.SyntaxHighlighter.HighlightAll('code');</script>
</body>
</html>