blob: 573fb15956ddb5a52633aa33a92955d66982abe5 [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>
<!-- Generated by javadoc -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Stream (Storm 2.4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Stream (Storm 2.4.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<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/Stream.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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/storm/streams/RefCountedTuple.html" title="class in org.apache.storm.streams"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/streams/StreamBuilder.html" title="class in org.apache.storm.streams"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/streams/Stream.html" target="_top">Frames</a></li>
<li><a href="Stream.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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.storm.streams</div>
<h2 title="Class Stream" class="title">Class Stream&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.storm.streams.Stream&lt;T&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a></dd>
</dl>
<hr>
<br>
<pre><a href="../../../../org/apache/storm/annotation/InterfaceStability.Unstable.html" title="annotation in org.apache.storm.annotation">@InterfaceStability.Unstable</a>
public class <span class="typeNameLabel">Stream&lt;T&gt;</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><p>Represents a stream of values.</p></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="memberSummary" 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>protected static <a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#KEY">KEY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#KEY_VALUE">KEY_VALUE</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected org.apache.storm.streams.Node</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#node">node</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#stream">stream</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/storm/streams/StreamBuilder.html" title="class in org.apache.storm.streams">StreamBuilder</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#streamBuilder">streamBuilder</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#VALUE">VALUE</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>&lt;A,R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#aggregate-org.apache.storm.streams.operations.CombinerAggregator-">aggregate</a></span>(<a href="../../../../org/apache/storm/streams/operations/CombinerAggregator.html" title="interface in org.apache.storm.streams.operations">CombinerAggregator</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,A,? extends R&gt;&nbsp;aggregator)</code>
<div class="block">Aggregates the values in this stream using the aggregator.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#aggregate-R-org.apache.storm.streams.operations.BiFunction-org.apache.storm.streams.operations.BiFunction-">aggregate</a></span>(R&nbsp;initialValue,
<a href="../../../../org/apache/storm/streams/operations/BiFunction.html" title="interface in org.apache.storm.streams.operations">BiFunction</a>&lt;? super R,? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;accumulator,
<a href="../../../../org/apache/storm/streams/operations/BiFunction.html" title="interface in org.apache.storm.streams.operations">BiFunction</a>&lt;? super R,? super R,? extends R&gt;&nbsp;combiner)</code>
<div class="block">Aggregates the values in this stream using the given initial value, accumulator and combiner.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#branch-org.apache.storm.streams.operations.Predicate...-">branch</a></span>(<a href="../../../../org/apache/storm/streams/operations/Predicate.html" title="interface in org.apache.storm.streams.operations">Predicate</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;...&nbsp;predicates)</code>
<div class="block">Returns an array of streams by splitting the given stream into multiple branches based on the given predicates.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#count--">count</a></span>()</code>
<div class="block">Counts the number of values in this stream.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#filter-org.apache.storm.streams.operations.Predicate-">filter</a></span>(<a href="../../../../org/apache/storm/streams/operations/Predicate.html" title="interface in org.apache.storm.streams.operations">Predicate</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;predicate)</code>
<div class="block">Returns a stream consisting of the elements of this stream that matches the given filter.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#flatMap-org.apache.storm.streams.operations.FlatMapFunction-">flatMap</a></span>(<a href="../../../../org/apache/storm/streams/operations/FlatMapFunction.html" title="interface in org.apache.storm.streams.operations">FlatMapFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;function)</code>
<div class="block">Returns a stream consisting of the results of replacing each value of this stream with the contents produced by applying the provided mapping function to each value.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#flatMapToPair-org.apache.storm.streams.operations.PairFlatMapFunction-">flatMapToPair</a></span>(<a href="../../../../org/apache/storm/streams/operations/PairFlatMapFunction.html" title="interface in org.apache.storm.streams.operations">PairFlatMapFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends K,? extends V&gt;&nbsp;function)</code>
<div class="block">Returns a stream consisting of the results of replacing each value of this stream with the key-value pairs produced by applying the provided mapping function to each value.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#forEach-org.apache.storm.streams.operations.Consumer-">forEach</a></span>(<a href="../../../../org/apache/storm/streams/operations/Consumer.html" title="interface in org.apache.storm.streams.operations">Consumer</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;action)</code>
<div class="block">Performs an action for each element of this stream.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#map-org.apache.storm.streams.operations.Function-">map</a></span>(<a href="../../../../org/apache/storm/streams/operations/Function.html" title="interface in org.apache.storm.streams.operations">Function</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;function)</code>
<div class="block">Returns a stream consisting of the result of applying the given mapping function to the values of this stream.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#mapToPair-org.apache.storm.streams.operations.PairFunction-">mapToPair</a></span>(<a href="../../../../org/apache/storm/streams/operations/PairFunction.html" title="interface in org.apache.storm.streams.operations">PairFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends K,? extends V&gt;&nbsp;function)</code>
<div class="block">Returns a stream of key-value pairs by applying a <a href="../../../../org/apache/storm/streams/operations/PairFunction.html" title="interface in org.apache.storm.streams.operations"><code>PairFunction</code></a> on each value of this stream.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#partitionBy-org.apache.storm.tuple.Fields-int-">partitionBy</a></span>(<a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a>&nbsp;fields,
int&nbsp;parallelism)</code>&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#peek-org.apache.storm.streams.operations.Consumer-">peek</a></span>(<a href="../../../../org/apache/storm/streams/operations/Consumer.html" title="interface in org.apache.storm.streams.operations">Consumer</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;action)</code>
<div class="block">Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as they are consumed from the resulting stream.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#print--">print</a></span>()</code>
<div class="block">Print the values in this stream.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#reduce-org.apache.storm.streams.operations.Reducer-">reduce</a></span>(<a href="../../../../org/apache/storm/streams/operations/Reducer.html" title="interface in org.apache.storm.streams.operations">Reducer</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;reducer)</code>
<div class="block">Performs a reduction on the elements of this stream, by repeatedly applying the reducer.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#repartition-int-">repartition</a></span>(int&nbsp;parallelism)</code>
<div class="block">Returns a new stream with the given value of parallelism.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>&lt;V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#stateQuery-org.apache.storm.streams.StreamState-">stateQuery</a></span>(<a href="../../../../org/apache/storm/streams/StreamState.html" title="class in org.apache.storm.streams">StreamState</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,V&gt;&nbsp;streamState)</code>
<div class="block">Queries the given stream state with the values in this stream as the keys.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#to-org.apache.storm.topology.IBasicBolt-">to</a></span>(<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt)</code>
<div class="block">Sends the elements of this stream to a bolt.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#to-org.apache.storm.topology.IBasicBolt-int-">to</a></span>(<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt,
int&nbsp;parallelism)</code>
<div class="block">Sends the elements of this stream to a bolt.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#to-org.apache.storm.topology.IRichBolt-">to</a></span>(<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt)</code>
<div class="block">Sends the elements of this stream to a bolt.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#to-org.apache.storm.topology.IRichBolt-int-">to</a></span>(<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt,
int&nbsp;parallelism)</code>
<div class="block">Sends the elements of this stream to a bolt.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/streams/Stream.html#window-org.apache.storm.streams.windowing.Window-">window</a></span>(<a href="../../../../org/apache/storm/streams/windowing/Window.html" title="interface in org.apache.storm.streams.windowing">Window</a>&lt;?,?&gt;&nbsp;window)</code>
<div class="block">Returns a new stream consisting of the elements that fall within the window as specified by the window parameter.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</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="KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY</h4>
<pre>protected static final&nbsp;<a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a> KEY</pre>
</li>
</ul>
<a name="VALUE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>VALUE</h4>
<pre>protected static final&nbsp;<a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a> VALUE</pre>
</li>
</ul>
<a name="KEY_VALUE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>KEY_VALUE</h4>
<pre>protected static final&nbsp;<a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a> KEY_VALUE</pre>
</li>
</ul>
<a name="streamBuilder">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>streamBuilder</h4>
<pre>protected final&nbsp;<a href="../../../../org/apache/storm/streams/StreamBuilder.html" title="class in org.apache.storm.streams">StreamBuilder</a> streamBuilder</pre>
</li>
</ul>
<a name="node">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>node</h4>
<pre>protected final&nbsp;org.apache.storm.streams.Node node</pre>
</li>
</ul>
<a name="stream">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stream</h4>
<pre>protected final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> stream</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="filter-org.apache.storm.streams.operations.Predicate-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filter</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;filter(<a href="../../../../org/apache/storm/streams/operations/Predicate.html" title="interface in org.apache.storm.streams.operations">Predicate</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;predicate)</pre>
<div class="block"><p>Returns a stream consisting of the elements of this stream that matches the given filter.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicate</code> - the predicate to apply to each element to determine if it should be included</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="map-org.apache.storm.streams.operations.Function-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public&nbsp;&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;&nbsp;map(<a href="../../../../org/apache/storm/streams/operations/Function.html" title="interface in org.apache.storm.streams.operations">Function</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;function)</pre>
<div class="block"><p>Returns a stream consisting of the result of applying the given mapping function to the values of this stream.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - a mapping function to be applied to each value in this stream.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="mapToPair-org.apache.storm.streams.operations.PairFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mapToPair</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;K,V&gt;&nbsp;mapToPair(<a href="../../../../org/apache/storm/streams/operations/PairFunction.html" title="interface in org.apache.storm.streams.operations">PairFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends K,? extends V&gt;&nbsp;function)</pre>
<div class="block"><p>Returns a stream of key-value pairs by applying a <a href="../../../../org/apache/storm/streams/operations/PairFunction.html" title="interface in org.apache.storm.streams.operations"><code>PairFunction</code></a> on each value of this stream.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - the mapping function to be applied to each value in this stream</dd>
<dd><code>K</code> - the key type</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream of key-value pairs</dd>
</dl>
</li>
</ul>
<a name="flatMap-org.apache.storm.streams.operations.FlatMapFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flatMap</h4>
<pre>public&nbsp;&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;&nbsp;flatMap(<a href="../../../../org/apache/storm/streams/operations/FlatMapFunction.html" title="interface in org.apache.storm.streams.operations">FlatMapFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;function)</pre>
<div class="block"><p>Returns a stream consisting of the results of replacing each value of this stream with the contents produced by applying the provided mapping function to each value. This has the effect of applying a one-to-many transformation to the values of the stream, and then flattening the resulting elements into a new stream.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - a mapping function to be applied to each value in this stream which produces new values.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="flatMapToPair-org.apache.storm.streams.operations.PairFlatMapFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flatMapToPair</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;K,V&gt;&nbsp;flatMapToPair(<a href="../../../../org/apache/storm/streams/operations/PairFlatMapFunction.html" title="interface in org.apache.storm.streams.operations">PairFlatMapFunction</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends K,? extends V&gt;&nbsp;function)</pre>
<div class="block"><p>Returns a stream consisting of the results of replacing each value of this stream with the key-value pairs produced by applying the provided mapping function to each value.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>function</code> - the mapping function to be applied to each value in this stream which produces new key-value pairs.</dd>
<dd><code>K</code> - the key type</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream of key-value pairs</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/storm/streams/Stream.html#flatMap-org.apache.storm.streams.operations.FlatMapFunction-"><code>flatMap(FlatMapFunction)</code></a>,
<a href="../../../../org/apache/storm/streams/Stream.html#mapToPair-org.apache.storm.streams.operations.PairFunction-"><code>mapToPair(PairFunction)</code></a></dd>
</dl>
</li>
</ul>
<a name="window-org.apache.storm.streams.windowing.Window-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>window</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;window(<a href="../../../../org/apache/storm/streams/windowing/Window.html" title="interface in org.apache.storm.streams.windowing">Window</a>&lt;?,?&gt;&nbsp;window)</pre>
<div class="block"><p>Returns a new stream consisting of the elements that fall within the window as specified by the window parameter. The <a href="../../../../org/apache/storm/streams/windowing/Window.html" title="interface in org.apache.storm.streams.windowing"><code>Window</code></a> specification could be used to specify sliding or tumbling windows based on time duration or event count. For example, <pre> // time duration based sliding window stream.window(SlidingWindows.of(Duration.minutes(10), Duration.minutes(1));</p><p>// count based sliding window stream.window(SlidingWindows.of(Count.(10), Count.of(2)));</p><p>// time duration based tumbling window stream.window(TumblingWindows.of(Duration.seconds(10)); </pre></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>window</code> - the window configuration</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/storm/streams/windowing/SlidingWindows.html" title="class in org.apache.storm.streams.windowing"><code>SlidingWindows</code></a>,
<a href="../../../../org/apache/storm/streams/windowing/TumblingWindows.html" title="class in org.apache.storm.streams.windowing"><code>TumblingWindows</code></a></dd>
</dl>
</li>
</ul>
<a name="forEach-org.apache.storm.streams.operations.Consumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forEach</h4>
<pre>public&nbsp;void&nbsp;forEach(<a href="../../../../org/apache/storm/streams/operations/Consumer.html" title="interface in org.apache.storm.streams.operations">Consumer</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;action)</pre>
<div class="block"><p>Performs an action for each element of this stream.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>action</code> - an action to perform on the elements</dd>
</dl>
</li>
</ul>
<a name="peek-org.apache.storm.streams.operations.Consumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peek</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;peek(<a href="../../../../org/apache/storm/streams/operations/Consumer.html" title="interface in org.apache.storm.streams.operations">Consumer</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;action)</pre>
<div class="block"><p>Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as they are consumed from the resulting stream.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>action</code> - the action to perform on the element as they are consumed from the stream</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="aggregate-org.apache.storm.streams.operations.CombinerAggregator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>aggregate</h4>
<pre>public&nbsp;&lt;A,R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;&nbsp;aggregate(<a href="../../../../org/apache/storm/streams/operations/CombinerAggregator.html" title="interface in org.apache.storm.streams.operations">CombinerAggregator</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,A,? extends R&gt;&nbsp;aggregator)</pre>
<div class="block"><p>Aggregates the values in this stream using the aggregator. This does a global aggregation of values across all partitions. <p> If the stream is windowed, the aggregate result is emitted after each window activation and represents the aggregate of elements that fall within that window. If the stream is not windowed, the aggregate result is emitted as each new element in the stream is processed. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>aggregator</code> - the aggregator</dd>
<dd><code>A</code> - the accumulator type</dd>
<dd><code>R</code> - the result type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="aggregate-java.lang.Object-org.apache.storm.streams.operations.BiFunction-org.apache.storm.streams.operations.BiFunction-">
<!-- -->
</a><a name="aggregate-R-org.apache.storm.streams.operations.BiFunction-org.apache.storm.streams.operations.BiFunction-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>aggregate</h4>
<pre>public&nbsp;&lt;R&gt;&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;R&gt;&nbsp;aggregate(R&nbsp;initialValue,
<a href="../../../../org/apache/storm/streams/operations/BiFunction.html" title="interface in org.apache.storm.streams.operations">BiFunction</a>&lt;? super R,? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,? extends R&gt;&nbsp;accumulator,
<a href="../../../../org/apache/storm/streams/operations/BiFunction.html" title="interface in org.apache.storm.streams.operations">BiFunction</a>&lt;? super R,? super R,? extends R&gt;&nbsp;combiner)</pre>
<div class="block"><p>Aggregates the values in this stream using the given initial value, accumulator and combiner. This does a global aggregation of values across all partitions. <p> If the stream is windowed, the aggregate result is emitted after each window activation and represents the aggregate of elements that fall within that window. If the stream is not windowed, the aggregate result is emitted as each new element in the stream is processed. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>initialValue</code> - the initial value of the result</dd>
<dd><code>accumulator</code> - the accumulator</dd>
<dd><code>combiner</code> - the combiner</dd>
<dd><code>R</code> - the result type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="count--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>count</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>&gt;&nbsp;count()</pre>
<div class="block"><p>Counts the number of values in this stream. This does a global count of values across all partitions. <p> If the stream is windowed, the counts are emitted after each window activation and represents the count of elements that fall within that window. If the stream is not windowed, the count is emitted as each new element in the stream is processed. </p></p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="reduce-org.apache.storm.streams.operations.Reducer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reduce</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;reduce(<a href="../../../../org/apache/storm/streams/operations/Reducer.html" title="interface in org.apache.storm.streams.operations">Reducer</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;reducer)</pre>
<div class="block"><p>Performs a reduction on the elements of this stream, by repeatedly applying the reducer. This does a global reduction of values across all partitions. <p> If the stream is windowed, the result is emitted after each window activation and represents the reduction of elements that fall within that window. If the stream is not windowed, the result is emitted as each new element in the stream is processed. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reducer</code> - the reducer</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="repartition-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>repartition</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;repartition(int&nbsp;parallelism)</pre>
<div class="block"><p>Returns a new stream with the given value of parallelism. Further operations on this stream would execute at this level of parallelism.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parallelism</code> - the parallelism value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the new stream</dd>
</dl>
</li>
</ul>
<a name="branch-org.apache.storm.streams.operations.Predicate...-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>branch</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;[]&nbsp;branch(<a href="../../../../org/apache/storm/streams/operations/Predicate.html" title="interface in org.apache.storm.streams.operations">Predicate</a>&lt;? super <a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;...&nbsp;predicates)</pre>
<div class="block"><p>Returns an array of streams by splitting the given stream into multiple branches based on the given predicates. The predicates are applied in the given order to the values of this stream and the result is forwarded to the corresponding (index based) result stream based on the (index of) predicate that matches. <p> <b>Note:</b> If none of the predicates match a value, that value is dropped. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>predicates</code> - the predicates</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of result streams (branches) corresponding to the given predicates</dd>
</dl>
</li>
</ul>
<a name="print--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>print</h4>
<pre>public&nbsp;void&nbsp;print()</pre>
<div class="block"><p>Print the values in this stream.</p></div>
</li>
</ul>
<a name="to-org.apache.storm.topology.IRichBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;void&nbsp;to(<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt)</pre>
<div class="block"><p>Sends the elements of this stream to a bolt. This could be used to plug in existing bolts as sinks in the stream, for e.g. a <code>RedisStoreBolt</code>. The bolt would have a parallelism of 1. <p> <b>Note:</b> This would provide guarantees only based on what the bolt provides. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bolt</code> - the bolt</dd>
</dl>
</li>
</ul>
<a name="to-org.apache.storm.topology.IRichBolt-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;void&nbsp;to(<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt,
int&nbsp;parallelism)</pre>
<div class="block"><p>Sends the elements of this stream to a bolt. This could be used to plug in existing bolts as sinks in the stream, for e.g. a <code>RedisStoreBolt</code>. <p> <b>Note:</b> This would provide guarantees only based on what the bolt provides. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bolt</code> - the bolt</dd>
<dd><code>parallelism</code> - the parallelism of the bolt</dd>
</dl>
</li>
</ul>
<a name="to-org.apache.storm.topology.IBasicBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;void&nbsp;to(<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt)</pre>
<div class="block"><p>Sends the elements of this stream to a bolt. This could be used to plug in existing bolts as sinks in the stream, for e.g. a <code>RedisStoreBolt</code>. The bolt would have a parallelism of 1. <p> <b>Note:</b> This would provide guarantees only based on what the bolt provides. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bolt</code> - the bolt</dd>
</dl>
</li>
</ul>
<a name="to-org.apache.storm.topology.IBasicBolt-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>to</h4>
<pre>public&nbsp;void&nbsp;to(<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt,
int&nbsp;parallelism)</pre>
<div class="block"><p>Sends the elements of this stream to a bolt. This could be used to plug in existing bolts as sinks in the stream, for e.g. a <code>RedisStoreBolt</code>. <p> <b>Note:</b> This would provide guarantees only based on what the bolt provides. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bolt</code> - the bolt</dd>
<dd><code>parallelism</code> - the parallelism of the bolt</dd>
</dl>
</li>
</ul>
<a name="stateQuery-org.apache.storm.streams.StreamState-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stateQuery</h4>
<pre>public&nbsp;&lt;V&gt;&nbsp;<a href="../../../../org/apache/storm/streams/PairStream.html" title="class in org.apache.storm.streams">PairStream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,V&gt;&nbsp;stateQuery(<a href="../../../../org/apache/storm/streams/StreamState.html" title="class in org.apache.storm.streams">StreamState</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>,V&gt;&nbsp;streamState)</pre>
<div class="block"><p>Queries the given stream state with the values in this stream as the keys.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>streamState</code> - the stream state</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result stream</dd>
</dl>
</li>
</ul>
<a name="partitionBy-org.apache.storm.tuple.Fields-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>partitionBy</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/storm/streams/Stream.html" title="class in org.apache.storm.streams">Stream</a>&lt;<a href="../../../../org/apache/storm/streams/Stream.html" title="type parameter in Stream">T</a>&gt;&nbsp;partitionBy(<a href="../../../../org/apache/storm/tuple/Fields.html" title="class in org.apache.storm.tuple">Fields</a>&nbsp;fields,
int&nbsp;parallelism)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<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/Stream.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"><script type="text/javascript" src="../../../../highlight.pack.js"></script>
<script type="text/javascript"><!--
hljs.initHighlightingOnLoad();
//--></script></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/storm/streams/RefCountedTuple.html" title="class in org.apache.storm.streams"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/streams/StreamBuilder.html" title="class in org.apache.storm.streams"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/streams/Stream.html" target="_top">Frames</a></li>
<li><a href="Stream.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;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>Copyright &#169; 2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>