com.atlassian.jira.index
Class DefaultIndex.Failure

java.lang.Object
  extended by com.atlassian.jira.index.DefaultIndex.Failure
All Implemented Interfaces:
Index.Result
Enclosing class:
DefaultIndex

public static class DefaultIndex.Failure
extends Object
implements Index.Result

Indicate that an operation failed.


Constructor Summary
DefaultIndex.Failure(Error failure)
           
DefaultIndex.Failure(Exception failure)
           
DefaultIndex.Failure(RuntimeException failure)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultIndex.Failure

public DefaultIndex.Failure(Error failure)

DefaultIndex.Failure

public DefaultIndex.Failure(RuntimeException failure)

DefaultIndex.Failure

public DefaultIndex.Failure(Exception failure)
Method Detail

await

public void await()
Description copied from interface: Index.Result
Await the result of the operation.

Specified by:
await in interface Index.Result

await

public boolean await(long timeout,
                     TimeUnit unit)
Description copied from interface: Index.Result
Await the result of the operation for the specified time, throwing a TimeoutException if the timeout is reached.

Specified by:
await in interface Index.Result
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.

isDone

public boolean isDone()
Description copied from interface: Index.Result
Has the operation completed yet. If true then Index.Result.await() and Index.Result.await(long, TimeUnit) will not block.

Specified by:
isDone in interface Index.Result
Returns:
whether the operation is complete or not.


Copyright © 2002-2014 Atlassian. All Rights Reserved.