Class DefaultFuture
java.lang.Object
java.util.concurrent.CompletableFuture<Object>
org.apache.dubbo.remoting.exchange.support.DefaultFuture
- All Implemented Interfaces:
CompletionStage<Object>,Future<Object>
DefaultFuture.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()booleancancel(boolean mayInterruptIfRunning) static voidcloseChannel(Channel channel, long timeout) close a channel when a channel is inactive directly return the unfinished requests.static voiddestroy()static DefaultFuturegetFuture(long id) static booleanstatic DefaultFuturenewFuture(Channel channel, Request request, int timeout, ExecutorService executor) init a DefaultFuture 1.init a DefaultFuture 2.timeout checkstatic voidstatic voidstatic voidvoidsetExecutor(ExecutorService executor) Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, exceptionNow, failedFuture, failedStage, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, resultNow, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, state, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsync
-
Method Details
-
getExecutor
-
setExecutor
-
destroy
public static void destroy() -
newFuture
public static DefaultFuture newFuture(Channel channel, Request request, int timeout, ExecutorService executor) init a DefaultFuture 1.init a DefaultFuture 2.timeout check- Parameters:
channel- channelrequest- the requesttimeout- timeout- Returns:
- a new DefaultFuture
-
getFuture
-
hasFuture
-
sent
-
closeChannel
close a channel when a channel is inactive directly return the unfinished requests.- Parameters:
channel- channel to close
-
received
-
received
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
cancel
public void cancel() -
getRequest
-