Class FutureWrapper<K,V> (2.0.0)
Stay organized with collections
Save and categorize content based on your preferences.
public abstract class FutureWrapper<K,V> implements Future<V>
FutureWrapper
is a simple Future that wraps a
parent Future
. This class is thread-safe.
Type Parameters |
---|
Name | Description |
K | |
V | |
Constructors
FutureWrapper(Future<K> parent)
public FutureWrapper(Future<K> parent)
Parameter |
---|
Name | Description |
parent | Future<K>
|
Methods
absorbParentException(Throwable cause)
protected V absorbParentException(Throwable cause)
Override this method if you want to suppress an exception thrown by the
parent and return a value instead.
cancel(boolean mayInterruptIfRunning)
public boolean cancel(boolean mayInterruptIfRunning)
Parameter |
---|
Name | Description |
mayInterruptIfRunning | boolean
|
convertException(Throwable cause)
protected abstract Throwable convertException(Throwable cause)
equals(@Nullable Object obj)
public final boolean equals(@Nullable Object obj)
Parameter |
---|
Name | Description |
obj | @org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
|
Overrides
get()
get(long timeout, TimeUnit unit)
public V get(long timeout, TimeUnit unit)
hashCode()
public final int hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
isCancelled()
public boolean isCancelled()
isDone()
wrap(@Nullable K key)
protected abstract V wrap(@Nullable K key)
Parameter |
---|
Name | Description |
key | @org.checkerframework.checker.nullness.qual.Nullable K
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-26 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]