mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
small docs improvements
This commit is contained in:
@@ -501,17 +501,8 @@ public interface Promise<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocks until this promise has completed, and then returns its result.
|
* Blocks until this promise has completed, and then returns its result. This method will throw
|
||||||
*
|
* checked exceptions if the promise completes exceptionally or the thread is interrupted.
|
||||||
* @return the result of the promise
|
|
||||||
* @throws CancellationException if the promise was cancelled
|
|
||||||
* @throws CompletionException if the promise completed exceptionally
|
|
||||||
*/
|
|
||||||
@Blocking
|
|
||||||
T await();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Blocks until this promise has completed, and then returns its result.
|
|
||||||
*
|
*
|
||||||
* @return the result of the promise
|
* @return the result of the promise
|
||||||
* @throws CancellationException if the promise was cancelled
|
* @throws CancellationException if the promise was cancelled
|
||||||
@@ -523,7 +514,8 @@ public interface Promise<T> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Blocks until either this promise has completed or the timeout has been exceeded, and then
|
* Blocks until either this promise has completed or the timeout has been exceeded, and then
|
||||||
* returns its result, if available.
|
* returns its result, if available. This method will throw checked exceptions if the promise
|
||||||
|
* completes exceptionally or the thread is interrupted, or the timeout is exceeded.
|
||||||
*
|
*
|
||||||
* @return the result of the promise
|
* @return the result of the promise
|
||||||
* @throws CancellationException if the promise was cancelled
|
* @throws CancellationException if the promise was cancelled
|
||||||
@@ -534,6 +526,18 @@ public interface Promise<T> {
|
|||||||
@Blocking
|
@Blocking
|
||||||
T get(long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException;
|
T get(long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Blocks until this promise has completed, and then returns its result. This method is similar
|
||||||
|
* to {@link #get()}, but will throw unchecked exceptions instead of checked exceptions if the
|
||||||
|
* promise completes exceptionally or the thread is interrupted.
|
||||||
|
*
|
||||||
|
* @return the result of the promise
|
||||||
|
* @throws CancellationException if the promise was cancelled
|
||||||
|
* @throws CompletionException if the promise completed exceptionally
|
||||||
|
*/
|
||||||
|
@Blocking
|
||||||
|
T await();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new promise, backed by this promise, that will not propagate cancellations. This means
|
* Returns a new promise, backed by this promise, that will not propagate cancellations. This means
|
||||||
* that if the returned promise is cancelled, the cancellation will not be propagated to this promise,
|
* that if the returned promise is cancelled, the cancellation will not be propagated to this promise,
|
||||||
|
|||||||
Reference in New Issue
Block a user