public static interface

Index.Result

com.atlassian.jira.index.Index.Result
Known Indirect Subclasses

Class Overview

The payload is unimportant. Call await() simply to block on the result being computed.

Summary

Public Methods
void await()
Await the result of the operation.
boolean await(long timeout, TimeUnit unit)
Await the result of the operation for the specified time, throwing a TimeoutException if the timeout is reached.
boolean isDone()
Has the operation completed yet.

Public Methods

public void await ()

Await the result of the operation.

Throws
RuntimeInterruptedException if interrupted
RuntimeException if the underlying operation caught an exception
Error if the underlying operation caught an error

public boolean await (long timeout, TimeUnit unit)

Await the result of the operation for the specified time, throwing a TimeoutException if the timeout is reached.

Parameters
timeout the amount to wait
unit 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 interrupted
RuntimeException if the underlying operation caught an exception
Error if the underlying operation caught an error

public boolean isDone ()

Has the operation completed yet. If true then await() and await(long, TimeUnit) will not block.

Returns
  • whether the operation is complete or not.