blob: e79fa4cfeb6fade4ba69331475ee8a50f8a44272 [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 (1.8.0_232) on Mon Mar 02 19:34:19 EST 2020 -->
<title>TopologyTestDriver (kafka 2.4.1 API)</title>
<meta name="date" content="2020-03-02">
<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="TopologyTestDriver (kafka 2.4.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":42,"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":42,"i15":42,"i16":42,"i17":42};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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="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/kafka/streams/TopologyDescription.Subtopology.html" title="interface in org.apache.kafka.streams"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/streams/TopologyTestDriver.html" target="_top">Frames</a></li>
<li><a href="TopologyTestDriver.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>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.kafka.streams</div>
<h2 title="Class TopologyTestDriver" class="title">Class TopologyTestDriver</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.kafka.streams.TopologyTestDriver</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">TopologyTestDriver</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>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre>
<div class="block">This class makes it easier to write tests to verify the behavior of topologies created with <a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> or
<a href="../../../../org/apache/kafka/streams/StreamsBuilder.html" title="class in org.apache.kafka.streams"><code>StreamsBuilder</code></a>.
You can test simple topologies that have a single processor, or very complex topologies that have multiple sources,
processors, sinks, or sub-topologies.
Best of all, the class works without a real Kafka broker, so the tests execute very quickly with very little overhead.
<p>
Using the <code>TopologyTestDriver</code> in tests is easy: simply instantiate the driver and provide a <a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a>
(cf. <a href="../../../../org/apache/kafka/streams/StreamsBuilder.html#build--"><code>StreamsBuilder.build()</code></a>) and <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>configs</code></a>, <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#createInputTopic-java.lang.String-org.apache.kafka.common.serialization.Serializer-org.apache.kafka.common.serialization.Serializer-"><code>create</code></a>
and use a <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> to supply an input records to the topology,
and then <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#createOutputTopic-java.lang.String-org.apache.kafka.common.serialization.Deserializer-org.apache.kafka.common.serialization.Deserializer-"><code>create</code></a> and use a <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> to read and
verify any output records by the topology.
<p>
Although the driver doesn't use a real Kafka broker, it does simulate Kafka <a href="../../../../org/apache/kafka/clients/consumer/Consumer.html" title="interface in org.apache.kafka.clients.consumer"><code>consumers</code></a> and
<a href="../../../../org/apache/kafka/clients/producer/Producer.html" title="interface in org.apache.kafka.clients.producer"><code>producers</code></a> that read and write raw <code>byte[]</code> messages.
You can let <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> and <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> to handle conversion
form regular Java objects to raw bytes.
<h2>Driver setup</h2>
In order to create a <code>TopologyTestDriver</code> instance, you need a <a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> and a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>config</code></a>.
The configuration needs to be representative of what you'd supply to the real topology, so that means including
several key properties (cf. <a href="../../../../org/apache/kafka/streams/StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>).
For example, the following code fragment creates a configuration that specifies a local Kafka broker list (which is
needed but not used), a timestamp extractor, and default serializers and deserializers for string keys and values:
<pre class="line-numbers"><code>
Properties props = new Properties();
props.setProperty(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9091");
props.setProperty(StreamsConfig.DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG, CustomTimestampExtractor.class.getName());
props.setProperty(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());
props.setProperty(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());
Topology topology = ...
TopologyTestDriver driver = new TopologyTestDriver(topology, props);
</code></pre>
<h2>Processing messages</h2>
<p>
Your test can supply new input records on any of the topics that the topology's sources consume.
This test driver simulates single-partitioned input topics.
Here's an example of an input message on the topic named <code>input-topic</code>:
<pre class="line-numbers"><code>
TestInputTopic&lt;String, String&gt; inputTopic = driver.createInputTopic("input-topic", stringSerdeSerializer, stringSerializer);
inputTopic.pipeInput("key1", "value1");
</code></pre>
When <a href="../../../../org/apache/kafka/streams/TestInputTopic.html#pipeInput-K-V-"><code>TestInputTopic.pipeInput(Object, Object)</code></a> is called, the driver passes the input message through to the appropriate source that
consumes the named topic, and will invoke the processor(s) downstream of the source.
If your topology's processors forward messages to sinks, your test can then consume these output messages to verify
they match the expected outcome.
For example, if our topology should have generated 2 messages on <code>output-topic-1</code> and 1 message on
<code>output-topic-2</code>, then our test can obtain these messages using the
<a href="../../../../org/apache/kafka/streams/TestOutputTopic.html#readKeyValue--"><code>TestOutputTopic.readKeyValue()</code></a> method:
<pre class="line-numbers"><code>
TestOutputTopic&lt;String, String&gt; outputTopic1 = driver.createOutputTopic("output-topic-1", stringDeserializer, stringDeserializer);
TestOutputTopic&lt;String, String&gt; outputTopic2 = driver.createOutputTopic("output-topic-2", stringDeserializer, stringDeserializer);
KeyValue&lt;String, String&gt; record1 = outputTopic1.readKeyValue();
KeyValue&lt;String, String&gt; record2 = outputTopic2.readKeyValue();
KeyValue&lt;String, String&gt; record3 = outputTopic1.readKeyValue();
</code></pre>
Again, our example topology generates messages with string keys and values, so we supply our string deserializer
instance for use on both the keys and values. Your test logic can then verify whether these output records are
correct.
<p>
Note, that calling <code>pipeInput()</code> will also trigger <a href="../../../../org/apache/kafka/streams/processor/PunctuationType.html#STREAM_TIME"><code>event-time</code></a> base
<a href="../../../../org/apache/kafka/streams/processor/ProcessorContext.html#schedule-java.time.Duration-org.apache.kafka.streams.processor.PunctuationType-org.apache.kafka.streams.processor.Punctuator-"><code>punctuation</code></a> callbacks.
However, you won't trigger <a href="../../../../org/apache/kafka/streams/processor/PunctuationType.html#WALL_CLOCK_TIME"><code>wall-clock</code></a> type punctuations that you must
trigger manually via <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#advanceWallClockTime-long-"><code>advanceWallClockTime(long)</code></a>.
<p>
Finally, when completed, make sure your tests <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#close--"><code>close()</code></a> the driver to release all resources and
<a href="../../../../org/apache/kafka/streams/processor/Processor.html" title="interface in org.apache.kafka.streams.processor"><code>processors</code></a>.
<h2>Processor state</h2>
<p>
Some processors use Kafka <a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>state storage</code></a>, so this driver class provides the generic
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a> as well as store-type specific methods so that your tests can check the underlying
state store(s) used by your topology's processors.
In our previous example, after we supplied a single input message and checked the three output messages, our test
could also check the key value store to verify the processor correctly added, removed, or updated internal state.
Or, our test might have pre-populated some state <em>before</em> submitting the input message, and verified afterward
that the processor(s) correctly updated the state.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a>,
<a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== 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/kafka/streams/TopologyTestDriver.html#TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-">TopologyTestDriver</a></span>(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config)</code>
<div class="block">Create a new test diver instance.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-java.time.Instant-">TopologyTestDriver</a></span>(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time">Instant</a>&nbsp;initialWallClockTime)</code>
<div class="block">Create a new test diver instance.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-long-">TopologyTestDriver</a></span>(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config,
long&nbsp;initialWallClockTimeMs)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-java.time.Instant-"><code>TopologyTestDriver(Topology, Properties, Instant)</code></a></span></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated 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/kafka/streams/TopologyTestDriver.html#advanceWallClockTime-java.time.Duration-">advanceWallClockTime</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html?is-external=true" title="class or interface in java.time">Duration</a>&nbsp;advance)</code>
<div class="block">Advances the internally mocked wall-clock time.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#advanceWallClockTime-long-">advanceWallClockTime</a></span>(long&nbsp;advanceMs)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#advanceWallClockTime-java.time.Duration-"><code>advanceWallClockTime(Duration)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#close--">close</a></span>()</code>
<div class="block">Close the driver, its topology, and all processors.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams">TestInputTopic</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#createInputTopic-java.lang.String-org.apache.kafka.common.serialization.Serializer-org.apache.kafka.common.serialization.Serializer-">createInputTopic</a></span>(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;K&gt;&nbsp;keySerializer,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;V&gt;&nbsp;valueSerializer)</code>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> to be used for piping records to topic
Uses current system time as start timestamp for records.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams">TestInputTopic</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#createInputTopic-java.lang.String-org.apache.kafka.common.serialization.Serializer-org.apache.kafka.common.serialization.Serializer-java.time.Instant-java.time.Duration-">createInputTopic</a></span>(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;K&gt;&nbsp;keySerializer,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;V&gt;&nbsp;valueSerializer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time">Instant</a>&nbsp;startTimestamp,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html?is-external=true" title="class or interface in java.time">Duration</a>&nbsp;autoAdvance)</code>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> to be used for piping records to topic
Uses provided start timestamp and autoAdvance parameter for records</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams">TestOutputTopic</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#createOutputTopic-java.lang.String-org.apache.kafka.common.serialization.Deserializer-org.apache.kafka.common.serialization.Deserializer-">createOutputTopic</a></span>(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;K&gt;&nbsp;keyDeserializer,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;V&gt;&nbsp;valueDeserializer)</code>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> to be used for reading records from topic</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<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>,<a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor">StateStore</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--">getAllStateStores</a></span>()</code>
<div class="block">Get all <a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStores</code></a> from the topology.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-">getKeyValueStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state">SessionStore</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-">getSessionStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state"><code>SessionStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor">StateStore</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-">getStateStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a>&lt;K,<a href="../../../../org/apache/kafka/streams/state/ValueAndTimestamp.html" title="class in org.apache.kafka.streams.state">ValueAndTimestamp</a>&lt;V&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-">getTimestampedKeyValueStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state">WindowStore</a>&lt;K,<a href="../../../../org/apache/kafka/streams/state/ValueAndTimestamp.html" title="class in org.apache.kafka.streams.state">ValueAndTimestamp</a>&lt;V&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-">getTimestampedWindowStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state">WindowStore</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-">getWindowStore</a></span>(<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>&nbsp;name)</code>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state"><code>WindowStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> with the given name.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../org/apache/kafka/common/MetricName.html" title="class in org.apache.kafka.common">MetricName</a>,? extends <a href="../../../../org/apache/kafka/common/Metric.html" title="interface in org.apache.kafka.common">Metric</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#metrics--">metrics</a></span>()</code>
<div class="block">Get read-only handle on global metrics registry.</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/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-">pipeInput</a></span>(<a href="../../../../org/apache/kafka/clients/consumer/ConsumerRecord.html" title="class in org.apache.kafka.clients.consumer">ConsumerRecord</a>&lt;byte[],byte[]&gt;&nbsp;consumerRecord)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> instead</span></div>
</div>
</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/kafka/streams/TopologyTestDriver.html#pipeInput-java.util.List-">pipeInput</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../org/apache/kafka/clients/consumer/ConsumerRecord.html" title="class in org.apache.kafka.clients.consumer">ConsumerRecord</a>&lt;byte[],byte[]&gt;&gt;&nbsp;records)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/kafka/clients/producer/ProducerRecord.html" title="class in org.apache.kafka.clients.producer">ProducerRecord</a>&lt;byte[],byte[]&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#readOutput-java.lang.String-">readOutput</a></span>(<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>&nbsp;topic)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/clients/producer/ProducerRecord.html" title="class in org.apache.kafka.clients.producer">ProducerRecord</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#readOutput-java.lang.String-org.apache.kafka.common.serialization.Deserializer-org.apache.kafka.common.serialization.Deserializer-">readOutput</a></span>(<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>&nbsp;topic,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;K&gt;&nbsp;keyDeserializer,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;V&gt;&nbsp;valueDeserializer)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> instead</span></div>
</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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TopologyTestDriver</h4>
<pre>public&nbsp;TopologyTestDriver(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config)</pre>
<div class="block">Create a new test diver instance.
Initialized the internally mocked wall-clock time with <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#currentTimeMillis--" title="class or interface in java.lang"><code>current system time</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - the topology to be tested</dd>
<dd><code>config</code> - the configuration for the topology</dd>
</dl>
</li>
</ul>
<a name="TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TopologyTestDriver</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;TopologyTestDriver(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config,
long&nbsp;initialWallClockTimeMs)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-java.time.Instant-"><code>TopologyTestDriver(Topology, Properties, Instant)</code></a></span></div>
<div class="block">Create a new test diver instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - the topology to be tested</dd>
<dd><code>config</code> - the configuration for the topology</dd>
<dd><code>initialWallClockTimeMs</code> - the initial value of internally mocked wall-clock time</dd>
</dl>
</li>
</ul>
<a name="TopologyTestDriver-org.apache.kafka.streams.Topology-java.util.Properties-java.time.Instant-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TopologyTestDriver</h4>
<pre>public&nbsp;TopologyTestDriver(<a href="../../../../org/apache/kafka/streams/Topology.html" title="class in org.apache.kafka.streams">Topology</a>&nbsp;topology,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;config,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time">Instant</a>&nbsp;initialWallClockTime)</pre>
<div class="block">Create a new test diver instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topology</code> - the topology to be tested</dd>
<dd><code>config</code> - the configuration for the topology</dd>
<dd><code>initialWallClockTime</code> - the initial value of internally mocked wall-clock time</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="metrics--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>metrics</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../org/apache/kafka/common/MetricName.html" title="class in org.apache.kafka.common">MetricName</a>,? extends <a href="../../../../org/apache/kafka/common/Metric.html" title="interface in org.apache.kafka.common">Metric</a>&gt;&nbsp;metrics()</pre>
<div class="block">Get read-only handle on global metrics registry.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Map of all metrics.</dd>
</dl>
</li>
</ul>
<a name="pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pipeInput</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;pipeInput(<a href="../../../../org/apache/kafka/clients/consumer/ConsumerRecord.html" title="class in org.apache.kafka.clients.consumer">ConsumerRecord</a>&lt;byte[],byte[]&gt;&nbsp;consumerRecord)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> instead</span></div>
<div class="block">Send an input message with the given key, value, and timestamp on the specified topic to the topology and then
commit the messages.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>consumerRecord</code> - the record to be processed</dd>
</dl>
</li>
</ul>
<a name="pipeInput-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pipeInput</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;pipeInput(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../org/apache/kafka/clients/consumer/ConsumerRecord.html" title="class in org.apache.kafka.clients.consumer">ConsumerRecord</a>&lt;byte[],byte[]&gt;&gt;&nbsp;records)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> instead</span></div>
<div class="block">Send input messages to the topology and then commit each message individually.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>records</code> - a list of records to be processed</dd>
</dl>
</li>
</ul>
<a name="advanceWallClockTime-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>advanceWallClockTime</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;advanceWallClockTime(long&nbsp;advanceMs)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#advanceWallClockTime-java.time.Duration-"><code>advanceWallClockTime(Duration)</code></a> instead</span></div>
<div class="block">Advances the internally mocked wall-clock time.
This might trigger a <a href="../../../../org/apache/kafka/streams/processor/PunctuationType.html#WALL_CLOCK_TIME"><code>wall-clock</code></a> type
<a href="../../../../org/apache/kafka/streams/processor/ProcessorContext.html#schedule-java.time.Duration-org.apache.kafka.streams.processor.PunctuationType-org.apache.kafka.streams.processor.Punctuator-"><code>punctuations</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>advanceMs</code> - the amount of time to advance wall-clock time in milliseconds</dd>
</dl>
</li>
</ul>
<a name="advanceWallClockTime-java.time.Duration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>advanceWallClockTime</h4>
<pre>public&nbsp;void&nbsp;advanceWallClockTime(<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html?is-external=true" title="class or interface in java.time">Duration</a>&nbsp;advance)</pre>
<div class="block">Advances the internally mocked wall-clock time.
This might trigger a <a href="../../../../org/apache/kafka/streams/processor/PunctuationType.html#WALL_CLOCK_TIME"><code>wall-clock</code></a> type
<a href="../../../../org/apache/kafka/streams/processor/ProcessorContext.html#schedule-java.time.Duration-org.apache.kafka.streams.processor.PunctuationType-org.apache.kafka.streams.processor.Punctuator-"><code>punctuations</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>advance</code> - the amount of time to advance wall-clock time</dd>
</dl>
</li>
</ul>
<a name="readOutput-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readOutput</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;<a href="../../../../org/apache/kafka/clients/producer/ProducerRecord.html" title="class in org.apache.kafka.clients.producer">ProducerRecord</a>&lt;byte[],byte[]&gt;&nbsp;readOutput(<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>&nbsp;topic)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> instead</span></div>
<div class="block">Read the next record from the given topic.
These records were output by the topology during the previous calls to <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>pipeInput(ConsumerRecord)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topic</code> - the name of the topic</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next record on that topic, or <code>null</code> if there is no record available</dd>
</dl>
</li>
</ul>
<a name="readOutput-java.lang.String-org.apache.kafka.common.serialization.Deserializer-org.apache.kafka.common.serialization.Deserializer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readOutput</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/clients/producer/ProducerRecord.html" title="class in org.apache.kafka.clients.producer">ProducerRecord</a>&lt;K,V&gt;&nbsp;readOutput(<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>&nbsp;topic,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;K&gt;&nbsp;keyDeserializer,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;V&gt;&nbsp;valueDeserializer)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">Since 2.4 use methods of <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> instead</span></div>
<div class="block">Read the next record from the given topic.
These records were output by the topology during the previous calls to <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>pipeInput(ConsumerRecord)</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topic</code> - the name of the topic</dd>
<dd><code>keyDeserializer</code> - the deserializer for the key type</dd>
<dd><code>valueDeserializer</code> - the deserializer for the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next record on that topic, or <code>null</code> if there is no record available</dd>
</dl>
</li>
</ul>
<a name="createInputTopic-java.lang.String-org.apache.kafka.common.serialization.Serializer-org.apache.kafka.common.serialization.Serializer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createInputTopic</h4>
<pre>public final&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams">TestInputTopic</a>&lt;K,V&gt;&nbsp;createInputTopic(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;K&gt;&nbsp;keySerializer,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;V&gt;&nbsp;valueSerializer)</pre>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> to be used for piping records to topic
Uses current system time as start timestamp for records.
Auto-advance is disabled.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topicName</code> - the name of the topic</dd>
<dd><code>keySerializer</code> - the Serializer for the key type</dd>
<dd><code>valueSerializer</code> - the Serializer for the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createInputTopic-java.lang.String-org.apache.kafka.common.serialization.Serializer-org.apache.kafka.common.serialization.Serializer-java.time.Instant-java.time.Duration-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createInputTopic</h4>
<pre>public final&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams">TestInputTopic</a>&lt;K,V&gt;&nbsp;createInputTopic(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;K&gt;&nbsp;keySerializer,
<a href="../../../../org/apache/kafka/common/serialization/Serializer.html" title="interface in org.apache.kafka.common.serialization">Serializer</a>&lt;V&gt;&nbsp;valueSerializer,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html?is-external=true" title="class or interface in java.time">Instant</a>&nbsp;startTimestamp,
<a href="https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html?is-external=true" title="class or interface in java.time">Duration</a>&nbsp;autoAdvance)</pre>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> to be used for piping records to topic
Uses provided start timestamp and autoAdvance parameter for records</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topicName</code> - the name of the topic</dd>
<dd><code>keySerializer</code> - the Serializer for the key type</dd>
<dd><code>valueSerializer</code> - the Serializer for the value type</dd>
<dd><code>startTimestamp</code> - Start timestamp for auto-generated record time</dd>
<dd><code>autoAdvance</code> - autoAdvance duration for auto-generated record time</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TestInputTopic.html" title="class in org.apache.kafka.streams"><code>TestInputTopic</code></a> object</dd>
</dl>
</li>
</ul>
<a name="createOutputTopic-java.lang.String-org.apache.kafka.common.serialization.Deserializer-org.apache.kafka.common.serialization.Deserializer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createOutputTopic</h4>
<pre>public final&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams">TestOutputTopic</a>&lt;K,V&gt;&nbsp;createOutputTopic(<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>&nbsp;topicName,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;K&gt;&nbsp;keyDeserializer,
<a href="../../../../org/apache/kafka/common/serialization/Deserializer.html" title="interface in org.apache.kafka.common.serialization">Deserializer</a>&lt;V&gt;&nbsp;valueDeserializer)</pre>
<div class="block">Create <a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> to be used for reading records from topic</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>K</code> - the key type</dd>
<dd><code>V</code> - the value type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>topicName</code> - the name of the topic</dd>
<dd><code>keyDeserializer</code> - the Deserializer for the key type</dd>
<dd><code>valueDeserializer</code> - the Deserializer for the value type</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TestOutputTopic.html" title="class in org.apache.kafka.streams"><code>TestOutputTopic</code></a> object</dd>
</dl>
</li>
</ul>
<a name="getAllStateStores--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAllStateStores</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<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>,<a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor">StateStore</a>&gt;&nbsp;getAllStateStores()</pre>
<div class="block">Get all <a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStores</code></a> from the topology.
The stores can be a "regular" or global stores.
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.
<p>
Note, that <code>StateStore</code> might be <code>null</code> if a store is added but not connected to any processor.
<p>
<strong>Caution:</strong> Using this method to access stores that are added by the DSL is unsafe as the store
types may change. Stores added by the DSL should only be accessed via the corresponding typed methods
like <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a> etc.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all stores my name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getStateStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStateStore</h4>
<pre>public&nbsp;<a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor">StateStore</a>&nbsp;getStateStore(<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>&nbsp;name)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
Should be used for custom stores only.
For built-in stores, the corresponding typed methods like <a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a> should be used.
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the state store, or <code>null</code> if no store has been registered with the given name</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the store is a built-in store like <a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a>,
<a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state"><code>WindowStore</code></a>, or <a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state"><code>SessionStore</code></a></dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getKeyValueStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getKeyValueStore</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a>&lt;K,V&gt;&nbsp;getKeyValueStore(<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>&nbsp;name)</pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
If the registered store is a <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> this method will return a value-only query
interface. <strong>It is highly recommended to update the code for this case to avoid bugs and to use
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a> for full store access instead.</strong>
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key value store, or <code>null</code> if no <a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a>
has been registered with the given name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getTimestampedKeyValueStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimestampedKeyValueStore</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a>&lt;K,<a href="../../../../org/apache/kafka/streams/state/ValueAndTimestamp.html" title="class in org.apache.kafka.streams.state">ValueAndTimestamp</a>&lt;V&gt;&gt;&nbsp;getTimestampedKeyValueStore(<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>&nbsp;name)</pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key value store, or <code>null</code> if no <a href="../../../../org/apache/kafka/streams/state/TimestampedKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedKeyValueStore</code></a> has been registered with the given name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getWindowStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getWindowStore</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state">WindowStore</a>&lt;K,V&gt;&nbsp;getWindowStore(<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>&nbsp;name)</pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state"><code>WindowStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
If the registered store is a <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> this method will return a value-only query
interface. <strong>It is highly recommended to update the code for this case to avoid bugs and to use
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a> for full store access instead.</strong>
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key value store, or <code>null</code> if no <a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state"><code>WindowStore</code></a> or <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a>
has been registered with the given name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getTimestampedWindowStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTimestampedWindowStore</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/WindowStore.html" title="interface in org.apache.kafka.streams.state">WindowStore</a>&lt;K,<a href="../../../../org/apache/kafka/streams/state/ValueAndTimestamp.html" title="class in org.apache.kafka.streams.state">ValueAndTimestamp</a>&lt;V&gt;&gt;&nbsp;getTimestampedWindowStore(<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>&nbsp;name)</pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key value store, or <code>null</code> if no <a href="../../../../org/apache/kafka/streams/state/TimestampedWindowStore.html" title="interface in org.apache.kafka.streams.state"><code>TimestampedWindowStore</code></a> has been registered with the given name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getSessionStore-java.lang.String-"><code>getSessionStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="getSessionStore-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSessionStore</h4>
<pre>public&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state">SessionStore</a>&lt;K,V&gt;&nbsp;getSessionStore(<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>&nbsp;name)</pre>
<div class="block">Get the <a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state"><code>SessionStore</code></a> with the given name.
The store can be a "regular" or global store.
<p>
This is often useful in test cases to pre-populate the store before the test case instructs the topology to
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#pipeInput-org.apache.kafka.clients.consumer.ConsumerRecord-"><code>process an input message</code></a>, and/or to check the store afterward.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the store</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the key value store, or <code>null</code> if no <a href="../../../../org/apache/kafka/streams/state/SessionStore.html" title="interface in org.apache.kafka.streams.state"><code>SessionStore</code></a> has been registered with the given name</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getAllStateStores--"><code>getAllStateStores()</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getStateStore-java.lang.String-"><code>getStateStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getKeyValueStore-java.lang.String-"><code>getKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedKeyValueStore-java.lang.String-"><code>getTimestampedKeyValueStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getWindowStore-java.lang.String-"><code>getWindowStore(String)</code></a>,
<a href="../../../../org/apache/kafka/streams/TopologyTestDriver.html#getTimestampedWindowStore-java.lang.String-"><code>getTimestampedWindowStore(String)</code></a></dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()</pre>
<div class="block">Close the driver, its topology, and all processors.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></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="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/kafka/streams/TopologyDescription.Subtopology.html" title="interface in org.apache.kafka.streams"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/kafka/streams/TopologyTestDriver.html" target="_top">Frames</a></li>
<li><a href="TopologyTestDriver.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>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 ======= -->
</body>
</html>