blob: 3300642c899b7a276295e24878ab3a647814c9d7 [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>TopologyBuilder (Storm 1.0.6 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="TopologyBuilder (Storm 1.0.6 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};
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/TopologyBuilder.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/topology/StatefulWindowedBoltExecutor.html" title="class in org.apache.storm.topology"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/topology/TopologyBuilder.BoltGetter.html" title="class in org.apache.storm.topology"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/topology/TopologyBuilder.html" target="_top">Frames</a></li>
<li><a href="TopologyBuilder.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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.topology</div>
<h2 title="Class TopologyBuilder" class="title">Class TopologyBuilder</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/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.topology.TopologyBuilder</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">TopologyBuilder</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><p>TopologyBuilder exposes the Java API for specifying a topology for Storm to execute. Topologies are Thrift structures in the end, but since the Thrift API is so verbose, TopologyBuilder greatly eases the process of creating topologies. The template for creating and submitting a topology looks something like:</p>
<pre><code class="java">TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(&quot;1&quot;, new TestWordSpout(true), 5);
builder.setSpout(&quot;2&quot;, new TestWordSpout(true), 3);
builder.setBolt(&quot;3&quot;, new TestWordCounter(), 3)
.fieldsGrouping(&quot;1&quot;, new Fields(&quot;word&quot;))
.fieldsGrouping(&quot;2&quot;, new Fields(&quot;word&quot;));
builder.setBolt(&quot;4&quot;, new TestGlobalCount())
.globalGrouping(&quot;1&quot;);
Map conf = new HashMap();
conf.put(Config.TOPOLOGY_WORKERS, 4);
StormSubmitter.submitTopology(&quot;mytopology&quot;, conf, builder.createTopology());
</code></pre><p>Running the exact same topology in local mode (in process), and configuring it to log all tuples emitted, looks like the following. Note that it lets the topology run for 10 seconds before shutting down the local cluster.</p>
<pre><code class="java">TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(&quot;1&quot;, new TestWordSpout(true), 5);
builder.setSpout(&quot;2&quot;, new TestWordSpout(true), 3);
builder.setBolt(&quot;3&quot;, new TestWordCounter(), 3)
.fieldsGrouping(&quot;1&quot;, new Fields(&quot;word&quot;))
.fieldsGrouping(&quot;2&quot;, new Fields(&quot;word&quot;));
builder.setBolt(&quot;4&quot;, new TestGlobalCount())
.globalGrouping(&quot;1&quot;);
Map conf = new HashMap();
conf.put(Config.TOPOLOGY_WORKERS, 4);
conf.put(Config.TOPOLOGY_DEBUG, true);
LocalCluster cluster = new LocalCluster();
cluster.submitTopology(&quot;mytopology&quot;, conf, builder.createTopology());
Utils.sleep(10000);
cluster.shutdown();
</code></pre><p>The pattern for <code>TopologyBuilder</code> is to map component ids to components using the setSpout and setBolt methods. Those methods return objects that are then used to declare the inputs for that component.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.BoltGetter.html" title="class in org.apache.storm.topology">TopologyBuilder.BoltGetter</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.ConfigGetter.html" title="class in org.apache.storm.topology">TopologyBuilder.ConfigGetter</a>&lt;<a href="../../../../org/apache/storm/topology/TopologyBuilder.ConfigGetter.html" title="type parameter in TopologyBuilder.ConfigGetter">T</a> extends <a href="../../../../org/apache/storm/topology/ComponentConfigurationDeclarer.html" title="interface in org.apache.storm.topology">ComponentConfigurationDeclarer</a>&gt;</span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.SpoutGetter.html" title="class in org.apache.storm.topology">TopologyBuilder.SpoutGetter</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#TopologyBuilder--">TopologyBuilder</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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#addWorkerHook-org.apache.storm.hooks.IWorkerHook-">addWorkerHook</a></span>(<a href="../../../../org/apache/storm/hooks/IWorkerHook.html" title="interface in org.apache.storm.hooks">IWorkerHook</a>&nbsp;workerHook)</code>
<div class="block">Add a new worker lifecycle hook</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/generated/StormTopology.html" title="class in org.apache.storm.generated">StormTopology</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#createTopology--">createTopology</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IBasicBolt-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IBasicBolt-java.lang.Number-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IRichBolt-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt)</code>
<div class="block">Define a new bolt in this topology with parallelism of just one thread.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IRichBolt-java.lang.Number-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new bolt in this topology with the specified amount of parallelism.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;<br><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IStatefulBolt-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulBolt.html" title="interface in org.apache.storm.topology">IStatefulBolt</a>&lt;T&gt;&nbsp;bolt)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;<br><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IStatefulBolt-java.lang.Number-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulBolt.html" title="interface in org.apache.storm.topology">IStatefulBolt</a>&lt;T&gt;&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;<br><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IStatefulWindowedBolt-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulWindowedBolt.html" title="interface in org.apache.storm.topology">IStatefulWindowedBolt</a>&lt;T&gt;&nbsp;bolt)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;<br><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IStatefulWindowedBolt-java.lang.Number-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulWindowedBolt.html" title="interface in org.apache.storm.topology">IStatefulWindowedBolt</a>&lt;T&gt;&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IWindowedBolt-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IWindowedBolt.html" title="interface in org.apache.storm.topology">IWindowedBolt</a>&nbsp;bolt)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setBolt-java.lang.String-org.apache.storm.topology.IWindowedBolt-java.lang.Number-">setBolt</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IWindowedBolt.html" title="interface in org.apache.storm.topology">IWindowedBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new bolt in this topology.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/SpoutDeclarer.html" title="interface in org.apache.storm.topology">SpoutDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setSpout-java.lang.String-org.apache.storm.topology.IRichSpout-">setSpout</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichSpout.html" title="interface in org.apache.storm.topology">IRichSpout</a>&nbsp;spout)</code>
<div class="block">Define a new spout in this topology.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/storm/topology/SpoutDeclarer.html" title="interface in org.apache.storm.topology">SpoutDeclarer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setSpout-java.lang.String-org.apache.storm.topology.IRichSpout-java.lang.Number-">setSpout</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichSpout.html" title="interface in org.apache.storm.topology">IRichSpout</a>&nbsp;spout,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>
<div class="block">Define a new spout in this topology with the specified parallelism.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setStateSpout-java.lang.String-org.apache.storm.topology.IRichStateSpout-">setStateSpout</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichStateSpout.html" title="interface in org.apache.storm.topology">IRichStateSpout</a>&nbsp;stateSpout)</code>&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/storm/topology/TopologyBuilder.html#setStateSpout-java.lang.String-org.apache.storm.topology.IRichStateSpout-java.lang.Number-">setStateSpout</a></span>(<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;id,
<a href="../../../../org/apache/storm/topology/IRichStateSpout.html" title="interface in org.apache.storm.topology">IRichStateSpout</a>&nbsp;stateSpout,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)</code>&nbsp;</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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TopologyBuilder--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TopologyBuilder</h4>
<pre>public&nbsp;TopologyBuilder()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="createTopology--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTopology</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/generated/StormTopology.html" title="class in org.apache.storm.generated">StormTopology</a>&nbsp;createTopology()</pre>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IRichBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology with parallelism of just one thread.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the bolt</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IRichBolt-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IRichBolt.html" title="interface in org.apache.storm.topology">IRichBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology with the specified amount of parallelism.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the bolt</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this bolt. Each task will run on a thread in a process somewhere around the cluster.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IBasicBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a basic bolt, which is a simpler to use but more restricted kind of bolt. Basic bolts are intended for non-aggregation processing and automate the anchoring/acking process to achieve proper reliability in the topology.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the basic bolt</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IBasicBolt-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IBasicBolt.html" title="interface in org.apache.storm.topology">IBasicBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a basic bolt, which is a simpler to use but more restricted kind of bolt. Basic bolts are intended for non-aggregation processing and automate the anchoring/acking process to achieve proper reliability in the topology.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the basic bolt</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this bolt. Each task will run on a thread in a process somewhere around the cluster.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IWindowedBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IWindowedBolt.html" title="interface in org.apache.storm.topology">IWindowedBolt</a>&nbsp;bolt)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a windowed bolt, intended for windowing operations. The <a href="../../../../org/apache/storm/topology/IWindowedBolt.html#execute-org.apache.storm.windowing.TupleWindow-"><code>IWindowedBolt.execute(TupleWindow)</code></a> method is triggered for each window interval with the list of current events in the window.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the windowed bolt</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IWindowedBolt-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IWindowedBolt.html" title="interface in org.apache.storm.topology">IWindowedBolt</a>&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a windowed bolt, intended for windowing operations. The <a href="../../../../org/apache/storm/topology/IWindowedBolt.html#execute-org.apache.storm.windowing.TupleWindow-"><code>IWindowedBolt.execute(TupleWindow)</code></a> method is triggered for each window interval with the list of current events in the window.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the windowed bolt</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this bolt. Each task will run on a thread in a process somwehere around the cluster.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IStatefulBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulBolt.html" title="interface in org.apache.storm.topology">IStatefulBolt</a>&lt;T&gt;&nbsp;bolt)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a stateful bolt, that requires its state (of computation) to be saved. When this bolt is initialized, the <a href="../../../../org/apache/storm/topology/IStatefulComponent.html#initState-T-"><code>IStatefulComponent.initState(State)</code></a> method is invoked after <a href="../../../../org/apache/storm/topology/IStatefulBolt.html#prepare-java.util.Map-org.apache.storm.task.TopologyContext-org.apache.storm.task.OutputCollector-"><code>IStatefulBolt.prepare(Map, TopologyContext, OutputCollector)</code></a> but before <a href="../../../../org/apache/storm/topology/IStatefulBolt.html#execute-org.apache.storm.tuple.Tuple-"><code>IStatefulBolt.execute(Tuple)</code></a> with its previously saved state. <p> The framework provides at-least once guarantee for the state updates. Bolts (both stateful and non-stateful) in a stateful topology are expected to anchor the tuples while emitting and ack the input tuples once its processed. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the stateful bolt</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IStatefulBolt-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulBolt.html" title="interface in org.apache.storm.topology">IStatefulBolt</a>&lt;T&gt;&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a stateful bolt, that requires its state (of computation) to be saved. When this bolt is initialized, the <a href="../../../../org/apache/storm/topology/IStatefulComponent.html#initState-T-"><code>IStatefulComponent.initState(State)</code></a> method is invoked after <a href="../../../../org/apache/storm/topology/IStatefulBolt.html#prepare-java.util.Map-org.apache.storm.task.TopologyContext-org.apache.storm.task.OutputCollector-"><code>IStatefulBolt.prepare(Map, TopologyContext, OutputCollector)</code></a> but before <a href="../../../../org/apache/storm/topology/IStatefulBolt.html#execute-org.apache.storm.tuple.Tuple-"><code>IStatefulBolt.execute(Tuple)</code></a> with its previously saved state. <p> The framework provides at-least once guarantee for the state updates. Bolts (both stateful and non-stateful) in a stateful topology are expected to anchor the tuples while emitting and ack the input tuples once its processed. </p></p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the stateful bolt</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this bolt. Each task will run on a thread in a process somwehere around the cluster.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IStatefulWindowedBolt-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulWindowedBolt.html" title="interface in org.apache.storm.topology">IStatefulWindowedBolt</a>&lt;T&gt;&nbsp;bolt)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a stateful windowed bolt, intended for stateful windowing operations. The <a href="../../../../org/apache/storm/topology/IWindowedBolt.html#execute-org.apache.storm.windowing.TupleWindow-"><code>IWindowedBolt.execute(TupleWindow)</code></a> method is triggered for each window interval with the list of current events in the window. During initialization of this bolt <a href="../../../../org/apache/storm/topology/IStatefulComponent.html#initState-T-"><code>IStatefulComponent.initState(State)</code></a> is invoked with its previously saved state.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the stateful windowed bolt</dd>
<dd><code>T</code> - the type of the state (e.g. <a href="../../../../org/apache/storm/state/KeyValueState.html" title="interface in org.apache.storm.state"><code>KeyValueState</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setBolt-java.lang.String-org.apache.storm.topology.IStatefulWindowedBolt-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBolt</h4>
<pre>public&nbsp;&lt;T extends <a href="../../../../org/apache/storm/state/State.html" title="interface in org.apache.storm.state">State</a>&gt;&nbsp;<a href="../../../../org/apache/storm/topology/BoltDeclarer.html" title="interface in org.apache.storm.topology">BoltDeclarer</a>&nbsp;setBolt(<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;id,
<a href="../../../../org/apache/storm/topology/IStatefulWindowedBolt.html" title="interface in org.apache.storm.topology">IStatefulWindowedBolt</a>&lt;T&gt;&nbsp;bolt,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new bolt in this topology. This defines a stateful windowed bolt, intended for stateful windowing operations. The <a href="../../../../org/apache/storm/topology/IWindowedBolt.html#execute-org.apache.storm.windowing.TupleWindow-"><code>IWindowedBolt.execute(TupleWindow)</code></a> method is triggered for each window interval with the list of current events in the window. During initialization of this bolt <a href="../../../../org/apache/storm/topology/IStatefulComponent.html#initState-T-"><code>IStatefulComponent.initState(State)</code></a> is invoked with its previously saved state.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this bolt&rsquo;s outputs.</dd>
<dd><code>bolt</code> - the stateful windowed bolt</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this bolt. Each task will run on a thread in a process somwehere around the cluster.</dd>
<dd><code>T</code> - the type of the state (e.g. <a href="../../../../org/apache/storm/state/KeyValueState.html" title="interface in org.apache.storm.state"><code>KeyValueState</code></a>)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>use the returned object to declare the inputs to this component</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setSpout-java.lang.String-org.apache.storm.topology.IRichSpout-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSpout</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/SpoutDeclarer.html" title="interface in org.apache.storm.topology">SpoutDeclarer</a>&nbsp;setSpout(<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;id,
<a href="../../../../org/apache/storm/topology/IRichSpout.html" title="interface in org.apache.storm.topology">IRichSpout</a>&nbsp;spout)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new spout in this topology.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this spout&rsquo;s outputs.</dd>
<dd><code>spout</code> - the spout</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setSpout-java.lang.String-org.apache.storm.topology.IRichSpout-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSpout</h4>
<pre>public&nbsp;<a href="../../../../org/apache/storm/topology/SpoutDeclarer.html" title="interface in org.apache.storm.topology">SpoutDeclarer</a>&nbsp;setSpout(<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;id,
<a href="../../../../org/apache/storm/topology/IRichSpout.html" title="interface in org.apache.storm.topology">IRichSpout</a>&nbsp;spout,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block"><p>Define a new spout in this topology with the specified parallelism. If the spout declares itself as non-distributed, the parallelism_hint will be ignored and only one task will be allocated to this component.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>id</code> - the id of this component. This id is referenced by other components that want to consume this spout&rsquo;s outputs.</dd>
<dd><code>parallelism_hint</code> - the number of tasks that should be assigned to execute this spout. Each task will run on a thread in a process somewhere around the cluster.</dd>
<dd><code>spout</code> - the spout</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if <code>parallelism_hint</code> is not positive</dd>
</dl>
</li>
</ul>
<a name="setStateSpout-java.lang.String-org.apache.storm.topology.IRichStateSpout-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStateSpout</h4>
<pre>public&nbsp;void&nbsp;setStateSpout(<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;id,
<a href="../../../../org/apache/storm/topology/IRichStateSpout.html" title="interface in org.apache.storm.topology">IRichStateSpout</a>&nbsp;stateSpout)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code></dd>
</dl>
</li>
</ul>
<a name="setStateSpout-java.lang.String-org.apache.storm.topology.IRichStateSpout-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStateSpout</h4>
<pre>public&nbsp;void&nbsp;setStateSpout(<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;id,
<a href="../../../../org/apache/storm/topology/IRichStateSpout.html" title="interface in org.apache.storm.topology">IRichStateSpout</a>&nbsp;stateSpout,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang">Number</a>&nbsp;parallelism_hint)
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code></dd>
</dl>
</li>
</ul>
<a name="addWorkerHook-org.apache.storm.hooks.IWorkerHook-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>addWorkerHook</h4>
<pre>public&nbsp;void&nbsp;addWorkerHook(<a href="../../../../org/apache/storm/hooks/IWorkerHook.html" title="interface in org.apache.storm.hooks">IWorkerHook</a>&nbsp;workerHook)</pre>
<div class="block"><p>Add a new worker lifecycle hook</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>workerHook</code> - the lifecycle hook to add</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>
<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/TopologyBuilder.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/topology/StatefulWindowedBoltExecutor.html" title="class in org.apache.storm.topology"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/storm/topology/TopologyBuilder.BoltGetter.html" title="class in org.apache.storm.topology"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/storm/topology/TopologyBuilder.html" target="_top">Frames</a></li>
<li><a href="TopologyBuilder.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><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&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; 2018 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>