Top Description Fields Constructors Methods
org.springframework.util.concurrent

pack-priv Class DelegatingCompletableFuture<T>

extends CompletableFuture<T>
Class Inheritance
Type Parameters
<T>
the result type returned by this Future's get method
Imports
java.util.concurrent.CompletableFuture, .Future, org.springframework.util.Assert

Extension of CompletableFuture which allows for cancelling a delegate along with the CompletableFuture itself.
Author
Juergen Hoeller
Since
5.0

Field Summary

Modifier and TypeField and Description
private final Future<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
cancel(boolean
this value has no effect in this implementation because interrupts are not used to control processing.
mayInterruptIfRunning
)

Overrides java.util.concurrent.CompletableFuture.cancel.

Implements java.util.concurrent.Future.cancel.

If not already completed, completes this CompletableFuture with a CancellationException.
Inherited from java.util.concurrent.CompletableFuture:
acceptEitheracceptEitherAsyncacceptEitherAsyncallOfanyOfapplyToEitherapplyToEitherAsyncapplyToEitherAsynccompletecompleteAsynccompleteAsynccompletedFuturecompletedStagecompleteExceptionallycompleteOnTimeoutcopydefaultExecutordelayedExecutordelayedExecutorexceptionallyexceptionallyAsyncexceptionallyAsyncexceptionallyComposeexceptionallyComposeAsyncexceptionallyComposeAsyncexceptionNowfailedFuturefailedStagegetgetgetNowgetNumberOfDependentshandlehandleAsynchandleAsyncisCancelledisCompletedExceptionallyisDonejoinminimalCompletionStagenewIncompleteFutureobtrudeExceptionobtrudeValueorTimeoutresultNowrunAfterBothrunAfterBothAsyncrunAfterBothAsyncrunAfterEitherrunAfterEitherAsyncrunAfterEitherAsyncrunAsyncrunAsyncstatesupplyAsyncsupplyAsyncthenAcceptthenAcceptAsyncthenAcceptAsyncthenAcceptBoththenAcceptBothAsyncthenAcceptBothAsyncthenApplythenApplyAsyncthenApplyAsyncthenCombinethenCombineAsyncthenCombineAsyncthenComposethenComposeAsyncthenComposeAsyncthenRunthenRunAsyncthenRunAsynctoCompletableFuturetoStringwhenCompletewhenCompleteAsyncwhenCompleteAsync

Field Detail

delegateback to summary
private final Future<T> delegate

Constructor Detail

DelegatingCompletableFutureback to summary
public DelegatingCompletableFuture(Future<T> delegate)

Method Detail

cancelback to summary
public boolean cancel(boolean mayInterruptIfRunning)

Overrides java.util.concurrent.CompletableFuture.cancel.

Implements java.util.concurrent.Future.cancel.

Doc from java.util.concurrent.CompletableFuture.cancel.

If not already completed, completes this CompletableFuture with a CancellationException. Dependent CompletableFutures that have not already completed will also complete exceptionally, with a CompletionException caused by this CancellationException.

Parameters
mayInterruptIfRunning:boolean

this value has no effect in this implementation because interrupts are not used to control processing.

Returns:boolean

true if this task is now cancelled

Annotations
@Override