| File was renamed from sdk/src/org/opends/sdk/ResultFuture.java |
| | |
| | | |
| | | |
| | | |
| | | import java.util.concurrent.CancellationException; |
| | | import java.util.concurrent.Future; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.TimeoutException; |
| | |
| | | * @param <S> |
| | | * The type of result returned by this future. |
| | | */ |
| | | public interface ResultFuture<S> extends Future<S> |
| | | public interface FutureResult<S> extends Future<S> |
| | | { |
| | | /** |
| | | * Attempts to cancel the request. This attempt will fail if the |
| | |
| | | * @throws ErrorResultException |
| | | * If the result code indicates that the request failed for |
| | | * some reason. |
| | | * @throws CancellationException |
| | | * If the request was cancelled using a call to |
| | | * {@link #cancel}. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | */ |
| | | S get() throws ErrorResultException, CancellationException, |
| | | InterruptedException; |
| | | S get() throws ErrorResultException, InterruptedException; |
| | | |
| | | |
| | | |
| | |
| | | * some reason. |
| | | * @throws TimeoutException |
| | | * If the wait timed out. |
| | | * @throws CancellationException |
| | | * If the request was cancelled using a call to |
| | | * {@link #cancel}. |
| | | * @throws InterruptedException |
| | | * If the current thread was interrupted while waiting. |
| | | */ |
| | | S get(long timeout, TimeUnit unit) throws ErrorResultException, |
| | | TimeoutException, CancellationException, InterruptedException; |
| | | TimeoutException, InterruptedException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the message ID of the request. |
| | | * Returns the request ID of the request if appropriate. |
| | | * |
| | | * @return The message ID. |
| | | * @return The request ID, or {@code -1} if there is no request ID. |
| | | */ |
| | | int getMessageID(); |
| | | int getRequestID(); |
| | | |
| | | |
| | | |