| <!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 (9) on Wed Mar 28 12:12:59 BST 2018 --> |
| <title>KafkaFuture (kafka 1.1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <meta name="date" content="2018-03-28"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-1.10.2.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="KafkaFuture (kafka 1.1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":6,"i1":9,"i2":6,"i3":6,"i4":9,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../";loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="fixedNav"> |
| <!-- ========= 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/common/KafkaException.html" title="class in org.apache.kafka.common"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="interface in org.apache.kafka.common"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/kafka/common/KafkaFuture.html" target="_top">Frames</a></li> |
| <li><a href="KafkaFuture.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><span>SEARCH: </span> |
| <input type="text" id="search" value=" " disabled="disabled"> |
| <input type="reset" id="reset" value=" " disabled="disabled"> |
| </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> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="../../../../org/apache/kafka/common/package-summary.html">org.apache.kafka.common</a></div> |
| <h2 title="Class KafkaFuture" class="title">Class KafkaFuture<T></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.kafka.common.KafkaFuture<T></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code>java.util.concurrent.Future<T></code></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre><a href="../../../../org/apache/kafka/common/annotation/InterfaceStability.Evolving.html" title="annotation in org.apache.kafka.common.annotation">@Evolving</a> |
| public abstract class <span class="typeNameLabel">KafkaFuture<T></span> |
| extends java.lang.Object |
| implements java.util.concurrent.Future<T></pre> |
| <div class="block">A flexible future which supports call chaining and other asynchronous programming patterns. This will |
| eventually become a thin shim on top of Java 8's CompletableFuture. |
| |
| The API for this class is still evolving and we may break compatibility in minor releases, if necessary.</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" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="interface in org.apache.kafka.common">KafkaFuture.BaseFunction</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="type parameter in KafkaFuture.BaseFunction">A</a>,<a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="type parameter in KafkaFuture.BaseFunction">B</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">A function which takes objects of type A and returns objects of type B.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="interface in org.apache.kafka.common">KafkaFuture.BiConsumer</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="type parameter in KafkaFuture.BiConsumer">A</a>,<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="type parameter in KafkaFuture.BiConsumer">B</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">A consumer of two different types of object.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.Function.html" title="class in org.apache.kafka.common">KafkaFuture.Function</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.Function.html" title="type parameter in KafkaFuture.Function">A</a>,<a href="../../../../org/apache/kafka/common/KafkaFuture.Function.html" title="type parameter in KafkaFuture.Function">B</a>></span></code></th> |
| <td class="colLast"> |
| <div class="block">A function which takes objects of type A and returns objects of type B.</div> |
| </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" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#KafkaFuture--">KafkaFuture</a></span>​()</code></th> |
| <td class="colLast"> </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" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected abstract void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#addWaiter-org.apache.kafka.common.KafkaFuture.BiConsumer-">addWaiter</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="interface in org.apache.kafka.common">KafkaFuture.BiConsumer</a><? super <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,? super java.lang.Throwable> action)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><java.lang.Void></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#allOf-org.apache.kafka.common.KafkaFuture...-">allOf</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><?>... futures)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new KafkaFuture that is completed when all the given futures have completed.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#cancel-boolean-">cancel</a></span>​(boolean mayInterruptIfRunning)</code></th> |
| <td class="colLast"> |
| <div class="block">If not already completed, completes this future with a CancellationException.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#complete-T-">complete</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> newValue)</code></th> |
| <td class="colLast"> |
| <div class="block">If not already completed, sets the value returned by get() and related methods to the given |
| value.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <U> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><U></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#completedFuture-U-">completedFuture</a></span>​(U value)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new KafkaFuture that is already completed with the given value.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#completeExceptionally-java.lang.Throwable-">completeExceptionally</a></span>​(java.lang.Throwable newException)</code></th> |
| <td class="colLast"> |
| <div class="block">If not already completed, causes invocations of get() and related methods to throw the given |
| exception.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#get--">get</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Waits if necessary for this future to complete, and then returns its result.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#get-long-java.util.concurrent.TimeUnit-">get</a></span>​(long timeout, |
| java.util.concurrent.TimeUnit unit)</code></th> |
| <td class="colLast"> |
| <div class="block">Waits if necessary for at most the given time for this future to complete, and then returns |
| its result, if available.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#getNow-T-">getNow</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> valueIfAbsent)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the result value (or throws any encountered exception) if completed, else returns |
| the given valueIfAbsent.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#isCancelled--">isCancelled</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this CompletableFuture was cancelled before it completed normally.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#isCompletedExceptionally--">isCompletedExceptionally</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this CompletableFuture completed exceptionally, in any way.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>abstract boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#isDone--">isDone</a></span>​()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if completed in any fashion: normally, exceptionally, or via cancellation.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>abstract <R> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#thenApply-org.apache.kafka.common.KafkaFuture.BaseFunction-">thenApply</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="interface in org.apache.kafka.common">KafkaFuture.BaseFunction</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,R> function)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new KafkaFuture that, when this future completes normally, is executed with this |
| futures's result as the argument to the supplied function.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>abstract <R> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><R></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#thenApply-org.apache.kafka.common.KafkaFuture.Function-">thenApply</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.Function.html" title="class in org.apache.kafka.common">KafkaFuture.Function</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,R> function)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/kafka/common/KafkaFuture.html#whenComplete-org.apache.kafka.common.KafkaFuture.BiConsumer-">whenComplete</a></span>​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="interface in org.apache.kafka.common">KafkaFuture.BiConsumer</a><? super <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,? super java.lang.Throwable> action)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a new KafkaFuture with the same result or exception as this future, that executes the given action |
| when this future completes.</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 java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</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="KafkaFuture--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>KafkaFuture</h4> |
| <pre>public KafkaFuture​()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="completedFuture-java.lang.Object-"> |
| <!-- --> |
| </a><a name="completedFuture-U-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>completedFuture</h4> |
| <pre>public static <U> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><U> completedFuture​(U value)</pre> |
| <div class="block">Returns a new KafkaFuture that is already completed with the given value.</div> |
| </li> |
| </ul> |
| <a name="allOf-org.apache.kafka.common.KafkaFuture...-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allOf</h4> |
| <pre>public static <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><java.lang.Void> allOf​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><?>... futures)</pre> |
| <div class="block">Returns a new KafkaFuture that is completed when all the given futures have completed. If |
| any future throws an exception, the returned future returns it. If multiple futures throw |
| an exception, which one gets returned is arbitrarily chosen.</div> |
| </li> |
| </ul> |
| <a name="thenApply-org.apache.kafka.common.KafkaFuture.BaseFunction-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>thenApply</h4> |
| <pre>public abstract <R> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><R> thenApply​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="interface in org.apache.kafka.common">KafkaFuture.BaseFunction</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,R> function)</pre> |
| <div class="block">Returns a new KafkaFuture that, when this future completes normally, is executed with this |
| futures's result as the argument to the supplied function. |
| |
| The function may be invoked by the thread that calls <code>thenApply</code> or it may be invoked by the thread that |
| completes the future.</div> |
| </li> |
| </ul> |
| <a name="thenApply-org.apache.kafka.common.KafkaFuture.Function-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>thenApply</h4> |
| <pre>public abstract <R> <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><R> thenApply​(<a href="../../../../org/apache/kafka/common/KafkaFuture.Function.html" title="class in org.apache.kafka.common">KafkaFuture.Function</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,R> function)</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/kafka/common/KafkaFuture.html#thenApply-org.apache.kafka.common.KafkaFuture.BaseFunction-"><code>Prefer as this function is here for backwards compatibility reasons |
| and might be deprecated/removed in a future release.</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="whenComplete-org.apache.kafka.common.KafkaFuture.BiConsumer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>whenComplete</h4> |
| <pre>public abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="class in org.apache.kafka.common">KafkaFuture</a><<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>> whenComplete​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="interface in org.apache.kafka.common">KafkaFuture.BiConsumer</a><? super <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,? super java.lang.Throwable> action)</pre> |
| <div class="block">Returns a new KafkaFuture with the same result or exception as this future, that executes the given action |
| when this future completes. |
| |
| When this future is done, the given action is invoked with the result (or null if none) and the exception |
| (or null if none) of this future as arguments. |
| |
| The returned future is completed when the action returns. |
| The supplied action should not throw an exception. However, if it does, the following rules apply: |
| if this future completed normally but the supplied action throws an exception, then the returned future completes |
| exceptionally with the supplied action's exception. |
| Or, if this future completed exceptionally and the supplied action throws an exception, then the returned future |
| completes exceptionally with this future's exception. |
| |
| The action may be invoked by the thread that calls <code>whenComplete</code> or it may be invoked by the thread that |
| completes the future.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>action</code> - the action to preform</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new future</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addWaiter-org.apache.kafka.common.KafkaFuture.BiConsumer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addWaiter</h4> |
| <pre>protected abstract void addWaiter​(<a href="../../../../org/apache/kafka/common/KafkaFuture.BiConsumer.html" title="interface in org.apache.kafka.common">KafkaFuture.BiConsumer</a><? super <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>,? super java.lang.Throwable> action)</pre> |
| </li> |
| </ul> |
| <a name="complete-java.lang.Object-"> |
| <!-- --> |
| </a><a name="complete-T-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>complete</h4> |
| <pre>protected abstract boolean complete​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> newValue)</pre> |
| <div class="block">If not already completed, sets the value returned by get() and related methods to the given |
| value.</div> |
| </li> |
| </ul> |
| <a name="completeExceptionally-java.lang.Throwable-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>completeExceptionally</h4> |
| <pre>protected abstract boolean completeExceptionally​(java.lang.Throwable newException)</pre> |
| <div class="block">If not already completed, causes invocations of get() and related methods to throw the given |
| exception.</div> |
| </li> |
| </ul> |
| <a name="cancel-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cancel</h4> |
| <pre>public abstract boolean cancel​(boolean mayInterruptIfRunning)</pre> |
| <div class="block">If not already completed, completes this future with a CancellationException. Dependent |
| futures that have not already completed will also complete exceptionally, with a |
| CompletionException caused by this CancellationException.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>cancel</code> in interface <code>java.util.concurrent.Future<<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="get--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>public abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> get​() |
| throws java.lang.InterruptedException, |
| java.util.concurrent.ExecutionException</pre> |
| <div class="block">Waits if necessary for this future to complete, and then returns its result.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>get</code> in interface <code>java.util.concurrent.Future<<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.InterruptedException</code></dd> |
| <dd><code>java.util.concurrent.ExecutionException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="get-long-java.util.concurrent.TimeUnit-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>get</h4> |
| <pre>public abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> get​(long timeout, |
| java.util.concurrent.TimeUnit unit) |
| throws java.lang.InterruptedException, |
| java.util.concurrent.ExecutionException, |
| java.util.concurrent.TimeoutException</pre> |
| <div class="block">Waits if necessary for at most the given time for this future to complete, and then returns |
| its result, if available.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>get</code> in interface <code>java.util.concurrent.Future<<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.InterruptedException</code></dd> |
| <dd><code>java.util.concurrent.ExecutionException</code></dd> |
| <dd><code>java.util.concurrent.TimeoutException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNow-java.lang.Object-"> |
| <!-- --> |
| </a><a name="getNow-T-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNow</h4> |
| <pre>public abstract <a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> getNow​(<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a> valueIfAbsent) |
| throws java.lang.InterruptedException, |
| java.util.concurrent.ExecutionException</pre> |
| <div class="block">Returns the result value (or throws any encountered exception) if completed, else returns |
| the given valueIfAbsent.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.InterruptedException</code></dd> |
| <dd><code>java.util.concurrent.ExecutionException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isCancelled--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isCancelled</h4> |
| <pre>public abstract boolean isCancelled​()</pre> |
| <div class="block">Returns true if this CompletableFuture was cancelled before it completed normally.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>isCancelled</code> in interface <code>java.util.concurrent.Future<<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</a>></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isCompletedExceptionally--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isCompletedExceptionally</h4> |
| <pre>public abstract boolean isCompletedExceptionally​()</pre> |
| <div class="block">Returns true if this CompletableFuture completed exceptionally, in any way.</div> |
| </li> |
| </ul> |
| <a name="isDone--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>isDone</h4> |
| <pre>public abstract boolean isDone​()</pre> |
| <div class="block">Returns true if completed in any fashion: normally, exceptionally, or via cancellation.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>isDone</code> in interface <code>java.util.concurrent.Future<<a href="../../../../org/apache/kafka/common/KafkaFuture.html" title="type parameter in KafkaFuture">T</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/common/KafkaException.html" title="class in org.apache.kafka.common"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/kafka/common/KafkaFuture.BaseFunction.html" title="interface in org.apache.kafka.common"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/kafka/common/KafkaFuture.html" target="_top">Frames</a></li> |
| <li><a href="KafkaFuture.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |