Top Description Interfaces Classes
module spring.core

Package org.springframework.util.concurrent

Annotations
@NonNullApi
@NonNullFields
Imports
org.springframework.lang.NonNullApi, .NonNullFields

Useful generic java.util.concurrent.Future extensions.

Interface Summary

Modifier and TypeInterface and Description
public interface
FailureCallback

Deprecated since 6.0. as of 6.0, in favor of java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)
Failure callback for a ListenableFuture.
public interface
ListenableFuture<
the result type returned by this Future's get method
T
>

Deprecated since 6.0. as of 6.0, in favor of CompletableFuture
Extend Future with the capability to accept completion callbacks.
public interface
ListenableFutureCallback<
the result type
T
>

Deprecated since 6.0. as of 6.0, in favor of java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)
Callback mechanism for the outcome, success or failure, from a ListenableFuture.
public interface
SuccessCallback<
the result type
T
>

Deprecated since 6.0. as of 6.0, in favor of java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)
Success callback for a ListenableFuture.

Class Summary

Modifier and TypeClass and Description
public class
CompletableToListenableFutureAdapter<
the result type returned by this Future's get method
T
>

Deprecated since 6.0. as of 6.0, with no concrete replacement
Adapts a CompletableFuture or CompletionStage into a Spring ListenableFuture.
pack-priv class
DelegatingCompletableFuture<
the result type returned by this Future's get method
T
>

Extension of CompletableFuture which allows for cancelling a delegate along with the CompletableFuture itself.

public abstract class
FutureAdapter<
the type of this Future
T
,
the type of the adaptee's Future
S
>

Deprecated since 6.0. as of 6.0, with no concrete replacement
Abstract class that adapts a Future parameterized over S into a Future parameterized over T.
public abstract class
FutureUtils

Convenience utilities for working with java.util.concurrent.Future and implementations.

public abstract class
ListenableFutureAdapter<
the type of this Future
T
,
the type of the adaptee's Future
S
>

Deprecated since 6.0. as of 6.0, in favor of java.util.concurrent.CompletableFuture
Abstract class that adapts a ListenableFuture parameterized over S into a ListenableFuture parameterized over T.
public class
ListenableFutureCallbackRegistry<
the callback result type
T
>

Deprecated since 6.0. as of 6.0, with no concrete replacement
Helper class for ListenableFuture implementations that maintains a queue of success and failure callbacks and helps to notify them.
public class
ListenableFutureTask<
the result type returned by this Future's get method
T
>

Deprecated since 6.0. as of 6.0, with no concrete replacement
Extension of FutureTask that implements ListenableFuture.
public class
MonoToListenableFutureAdapter<
the object type
T
>

Deprecated since 6.0. as of 6.0, in favor of Mono#toFuture()
Adapts a Mono into a ListenableFuture by obtaining a CompletableFuture from the Mono via Mono#toFuture() and then adapting it with CompletableToListenableFutureAdapter.
public class
SettableListenableFuture<
the result type returned by this Future's get method
T
>

Deprecated since 6.0. as of 6.0, in favor of CompletableFuture
A ListenableFuture whose value can be set via set(Object) or setException(Throwable).