spring-framework / org.springframework.util.concurrent / FutureAdapter

FutureAdapter

abstract class FutureAdapter<T : Any, S : Any> : Future<T>

Abstract class that adapts a Future parameterized over S into a Future parameterized over T. All methods are delegated to the adaptee, where #get() and #get(long, TimeUnit) call #adapt(Object) on the adaptee's result.

Parameters

- the type of this Future

- the type of the adaptee's Future

Author
Arjen Poutsma

Since
4.0

Functions

cancel

open fun cancel(mayInterruptIfRunning: Boolean): Boolean

get

open fun get(): T
open fun get(timeout: Long, unit: TimeUnit): T

isCancelled

open fun isCancelled(): Boolean

isDone

open fun isDone(): Boolean

Inheritors

ListenableFutureAdapter

abstract class ListenableFutureAdapter<T : Any, S : Any> : FutureAdapter<T, S>, ListenableFuture<T>

Abstract class that adapts a ListenableFuture parameterized over S into a ListenableFuture parameterized over T. All methods are delegated to the adaptee, where #get(), #get(long, java.util.concurrent.TimeUnit), and ListenableFutureCallback#onSuccess(Object) call #adapt(Object) on the adaptee's result.