Package com.atlassian.jira.index
Interface Index.Result
- All Known Implementing Classes:
DefaultIndex.Failure,DefaultIndex.Success,FutureResult,MockResult
- Enclosing interface:
Index
public static interface Index.Result
The payload is unimportant. Call
await() simply to block on the
result being computed.-
Method Summary
Modifier and TypeMethodDescriptionvoidawait()Await the result of the operation.booleanAwait the result of the operation for the specified time, throwing aTimeoutExceptionif the timeout is reached.booleanisDone()Has the operation completed yet.
-
Method Details
-
await
void await()Await the result of the operation.- Throws:
RuntimeInterruptedException- if interruptedRuntimeException- if the underlying operation caught an exceptionError- if the underlying operation caught an error
-
await
Await the result of the operation for the specified time, throwing aTimeoutExceptionif the timeout is reached.- Parameters:
timeout- the amount to waitunit- the unit to count the timeout in- Returns:
- false if the timeout is exceeded before the underlying operation has completed, true if it has completed in time.
- Throws:
RuntimeInterruptedException- if interruptedRuntimeException- if the underlying operation caught an exceptionError- if the underlying operation caught an error
-
isDone
boolean isDone()Has the operation completed yet. If true thenawait()andawait(long, TimeUnit)will not block.- Returns:
- whether the operation is complete or not.
-