- 2.53.0 (latest)
- 2.52.0
- 2.51.2
- 2.50.0
- 2.49.0
- 2.48.0
- 2.46.1
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.1
- 2.41.0
- 2.40.0
- 2.38.0
- 2.37.1
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.1
- 2.30.0
- 2.29.1
- 2.28.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.1
- 2.16.0
- 2.15.1
- 2.14.1
- 2.13.1
- 2.7.0
- 2.6.3
- 2.5.0
- 2.4.0
- 2.3.1
- 2.1.2
public
final
class
ApiFutures
Static utility methods for the ApiFuture interface.
Static Methods
<I,O>transformAsync(ApiFuture<I> input, ApiAsyncFunction<I,O> function)
public
static
ApiFuture<O>
< I
,
O>transformAsync
(
ApiFuture<I>
input
,
ApiAsyncFunction<I
,
O
>
function
)
<I,O>transformAsync(ApiFuture<I> input, ApiAsyncFunction<I,O> function, Executor executor)
public
static
ApiFuture<O>
< I
,
O>transformAsync
(
ApiFuture<I>
input
,
ApiAsyncFunction<I
,
O
>
function
,
Executor
executor
)
<V,X>catching(ApiFuture<? extends V> input, Class<X> exceptionType, ApiFunction<? super X,? extends V> callback)
public
static
ApiFuture<V>
< V
,
X>catching
(
ApiFuture
< ?
extends
V
>
input
,
Class<X>
exceptionType
,
ApiFunction
< ?
super
X
,
?
extends
V
>
callback
)
Parameters
Name
Description
input
ApiFuture
< ? extends V
>
exceptionType
Class
< X
>
callback
ApiFunction
< ? super X
, ? extends V
>
<V,X>catching(ApiFuture<? extends V> input, Class<X> exceptionType, ApiFunction<? super X,? extends V> callback, Executor executor)
public
static
ApiFuture<V>
< V
,
X>catching
(
ApiFuture
< ?
extends
V
>
input
,
Class<X>
exceptionType
,
ApiFunction
< ?
super
X
,
?
extends
V
>
callback
,
Executor
executor
)
Parameters
Name
Description
input
ApiFuture
< ? extends V
>
exceptionType
Class
< X
>
callback
ApiFunction
< ? super X
, ? extends V
>
executor
<V,X>catchingAsync(ApiFuture<V> input, Class<X> exceptionType, ApiAsyncFunction<? super X,V> callback, Executor executor)
public
static
ApiFuture<V>
< V
,
X>catchingAsync
(
ApiFuture<V>
input
,
Class<X>
exceptionType
,
ApiAsyncFunction
< ?
super
X
,
V
>
callback
,
Executor
executor
)
Parameters
Name
Description
input
ApiFuture
< V
>
exceptionType
Class
< X
>
callback
ApiAsyncFunction
< ? super X
, V
>
executor
<V,X>transform(ApiFuture<? extends V> input, ApiFunction<? super V,? extends X> function)
public
static
ApiFuture<X>
< V
,
X>transform
(
ApiFuture
< ?
extends
V
>
input
,
ApiFunction
< ?
super
V
,
?
extends
X
>
function
)
Parameters
Name
Description
input
ApiFuture
< ? extends V
>
function
ApiFunction
< ? super V
, ? extends X
>
<V,X>transform(ApiFuture<? extends V> input, ApiFunction<? super V,? extends X> function, Executor executor)
public
static
ApiFuture<X>
< V
,
X>transform
(
ApiFuture
< ?
extends
V
>
input
,
ApiFunction
< ?
super
V
,
?
extends
X
>
function
,
Executor
executor
)
Parameters
Name
Description
input
ApiFuture
< ? extends V
>
function
ApiFunction
< ? super V
, ? extends X
>
executor
<V>addCallback(ApiFuture<V> future, ApiFutureCallback<? super V> callback)
public
static
void
< V>addCallback
(
ApiFuture<V>
future
,
ApiFutureCallback
< ?
super
V
>
callback
)
<V>addCallback(ApiFuture<V> future, ApiFutureCallback<? super V> callback, Executor executor)
public
static
void
< V>addCallback
(
ApiFuture<V>
future
,
ApiFutureCallback
< ?
super
V
>
callback
,
Executor
executor
)
Parameters
Name
Description
future
ApiFuture
< V
>
callback
ApiFutureCallback
< ? super V
>
executor
<V>allAsList(Iterable<? extends ApiFuture<? extends V>> futures)
public
static
ApiFuture<List<V>
>
< V>allAsList
(
Iterable
< ?
extends
ApiFuture
< ?
extends
V
>>
futures
)
Parameter
Name
Description
futures
Iterable
< ? extends com.google.api.core.ApiFuture
< ? extends V
>>
<V>immediateCancelledFuture()
public
static
ApiFuture<V>
< V>immediateCancelledFuture
()
<V>immediateFailedFuture(Throwable throwable)
public
static
ApiFuture<V>
< V>immediateFailedFuture
(
Throwable
throwable
)
<V>immediateFuture(V value)
public
static
ApiFuture<V>
< V>immediateFuture
(
V
value
)
Parameter
Name
Description
value
V
<V>successfulAsList(Iterable<? extends ApiFuture<? extends V>> futures)
public
static
ApiFuture<List<V>
>
< V>successfulAsList
(
Iterable
< ?
extends
ApiFuture
< ?
extends
V
>>
futures
)
Parameter
Name
Description
futures
Iterable
< ? extends com.google.api.core.ApiFuture
< ? extends V
>>